@agentica/core 0.16.8 → 0.17.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.
Files changed (76) hide show
  1. package/lib/Agentica.js +2 -2
  2. package/lib/Agentica.js.map +1 -1
  3. package/lib/MicroAgentica.js +2 -2
  4. package/lib/MicroAgentica.js.map +1 -1
  5. package/lib/context/AgenticaOperation.d.ts +4 -2
  6. package/lib/context/internal/AgenticaOperationComposer.d.ts +0 -9
  7. package/lib/context/internal/AgenticaOperationComposer.js +105 -35
  8. package/lib/context/internal/AgenticaOperationComposer.js.map +1 -1
  9. package/lib/context/internal/AgenticaOperationComposer.spec.d.ts +1 -0
  10. package/lib/context/internal/AgenticaOperationComposer.spec.js +266 -0
  11. package/lib/context/internal/AgenticaOperationComposer.spec.js.map +1 -0
  12. package/lib/events/AgenticaDescribeEvent.d.ts +1 -1
  13. package/lib/events/AgenticaResponseEvent.d.ts +1 -1
  14. package/lib/events/AgenticaTextEvent.d.ts +1 -1
  15. package/lib/factory/events.d.ts +3 -3
  16. package/lib/functional/assertHttpLlmApplication.js +31 -31
  17. package/lib/functional/assertMcpLlmApplication.d.ts +15 -0
  18. package/lib/functional/assertMcpLlmApplication.js +59 -0
  19. package/lib/functional/assertMcpLlmApplication.js.map +1 -0
  20. package/lib/functional/validateHttpLlmApplication.js +27 -27
  21. package/lib/index.d.ts +1 -0
  22. package/lib/index.js +2 -0
  23. package/lib/index.js.map +1 -1
  24. package/lib/index.mjs +435 -220
  25. package/lib/index.mjs.map +1 -1
  26. package/lib/json/IAgenticaOperationJson.d.ts +1 -1
  27. package/lib/orchestrate/call.js +205 -95
  28. package/lib/orchestrate/call.js.map +1 -1
  29. package/lib/orchestrate/describe.js +1 -1
  30. package/lib/orchestrate/describe.js.map +1 -1
  31. package/lib/orchestrate/initialize.js +61 -61
  32. package/lib/orchestrate/initialize.js.map +1 -1
  33. package/lib/orchestrate/select.js +1 -1
  34. package/lib/orchestrate/select.js.map +1 -1
  35. package/lib/structures/IAgenticaController.d.ts +9 -2
  36. package/lib/structures/mcp/IMcpLlmApplication.d.ts +15 -0
  37. package/lib/structures/mcp/IMcpLlmApplication.js +3 -0
  38. package/lib/structures/mcp/IMcpLlmApplication.js.map +1 -0
  39. package/lib/structures/mcp/IMcpLlmFunction.d.ts +17 -0
  40. package/lib/structures/mcp/IMcpLlmFunction.js +3 -0
  41. package/lib/structures/mcp/IMcpLlmFunction.js.map +1 -0
  42. package/lib/structures/mcp/IMcpLlmTransportProps.d.ts +11 -0
  43. package/lib/structures/mcp/IMcpLlmTransportProps.js +3 -0
  44. package/lib/structures/mcp/IMcpLlmTransportProps.js.map +1 -0
  45. package/lib/structures/mcp/index.d.ts +3 -0
  46. package/lib/structures/mcp/index.js +20 -0
  47. package/lib/structures/mcp/index.js.map +1 -0
  48. package/lib/transformers/AgenticaEventTransformer.js +2 -2
  49. package/lib/transformers/AgenticaEventTransformer.js.map +1 -1
  50. package/lib/utils/StreamUtil.d.ts +4 -2
  51. package/lib/utils/StreamUtil.js +58 -10
  52. package/lib/utils/StreamUtil.js.map +1 -1
  53. package/package.json +11 -6
  54. package/src/Agentica.ts +3 -3
  55. package/src/MicroAgentica.ts +3 -3
  56. package/src/context/AgenticaOperation.ts +9 -2
  57. package/src/context/internal/AgenticaOperationComposer.spec.ts +314 -0
  58. package/src/context/internal/AgenticaOperationComposer.ts +119 -49
  59. package/src/events/AgenticaDescribeEvent.ts +1 -1
  60. package/src/events/AgenticaResponseEvent.ts +1 -1
  61. package/src/events/AgenticaTextEvent.ts +1 -1
  62. package/src/factory/events.ts +3 -3
  63. package/src/functional/assertMcpLlmApplication.ts +48 -0
  64. package/src/index.ts +6 -2
  65. package/src/json/IAgenticaOperationJson.ts +1 -1
  66. package/src/orchestrate/call.ts +239 -137
  67. package/src/orchestrate/describe.ts +2 -2
  68. package/src/orchestrate/initialize.ts +2 -2
  69. package/src/orchestrate/select.ts +2 -2
  70. package/src/structures/IAgenticaController.ts +12 -2
  71. package/src/structures/mcp/IMcpLlmApplication.ts +17 -0
  72. package/src/structures/mcp/IMcpLlmFunction.ts +19 -0
  73. package/src/structures/mcp/IMcpLlmTransportProps.ts +13 -0
  74. package/src/structures/mcp/index.ts +3 -0
  75. package/src/transformers/AgenticaEventTransformer.ts +3 -3
  76. package/src/utils/StreamUtil.ts +18 -8
package/lib/index.mjs CHANGED
@@ -10,6 +10,14 @@ import * as __typia_transform__assertGuard from "typia/lib/internal/_assertGuard
10
10
 
11
11
  import * as __typia_transform__accessExpressionAsString from "typia/lib/internal/_accessExpressionAsString.js";
12
12
 
13
+ import { Client } from "@modelcontextprotocol/sdk/client/index.js";
14
+
15
+ import { SSEClientTransport } from "@modelcontextprotocol/sdk/client/sse.js";
16
+
17
+ import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
18
+
19
+ import { ListToolsResultSchema } from "@modelcontextprotocol/sdk/types.js";
20
+
13
21
  class AgenticaTokenUsage {
14
22
  constructor(props) {
15
23
  if (props === undefined) {
@@ -116,33 +124,13 @@ function __map_take(dict, key, generator) {
116
124
 
117
125
  function compose(props) {
118
126
  const unique = props.controllers.length === 1 || (() => {
119
- const names = props.controllers.map((controller => controller.application.functions.map((func => func.name)))).flat();
127
+ const names = props.controllers.map((controllers => controllers.application.functions.map((func => func.name)))).flat();
120
128
  return new Set(names).size === names.length;
121
129
  })();
122
- const naming = (func, ci) => unique ? func : `_${ci}_${func}`;
123
- const array = props.controllers.map(((controller, ci) => controller.protocol === "http" ? controller.application.functions.map((func => ({
124
- protocol: "http",
125
- controller,
126
- function: func,
127
- name: naming(func.name, ci),
128
- toJSON: () => ({
129
- protocol: "http",
130
- controller: controller.name,
131
- function: func.name,
132
- name: naming(func.name, ci)
133
- })
134
- }))) : controller.application.functions.map((func => ({
135
- protocol: "class",
136
- controller,
137
- function: func,
138
- name: naming(func.name, ci),
139
- toJSON: () => ({
140
- protocol: "class",
141
- controller: controller.name,
142
- function: func.name,
143
- name: naming(func.name, ci)
144
- })
145
- }))))).flat();
130
+ const array = getOperations({
131
+ controllers: props.controllers,
132
+ naming: (func, controllerIndex) => unique ? func : `_${controllerIndex}_${func}`
133
+ });
146
134
  const capacity = props.config?.capacity;
147
135
  const divided = capacity !== undefined && array.length > capacity ? divide({
148
136
  array,
@@ -162,7 +150,97 @@ function compose(props) {
162
150
  };
163
151
  }
164
152
 
153
+ function getOperations(props) {
154
+ return props.controllers.flatMap(((controller, idx) => {
155
+ switch (controller.protocol) {
156
+ case "http":
157
+ {
158
+ return toHttpOperations({
159
+ controller,
160
+ index: idx,
161
+ naming: props.naming
162
+ });
163
+ }
164
+
165
+ case "class":
166
+ {
167
+ return toClassOperations({
168
+ controller,
169
+ index: idx,
170
+ naming: props.naming
171
+ });
172
+ }
173
+
174
+ case "mcp":
175
+ {
176
+ return toMcpOperations({
177
+ controller,
178
+ index: idx,
179
+ naming: props.naming
180
+ });
181
+ }
182
+
183
+ default:
184
+ throw new Error(`Unsupported protocol: ${controller.protocol}`);
185
+ }
186
+ }));
187
+ }
188
+
189
+ function toHttpOperations(props) {
190
+ return props.controller.application.functions.map((func => ({
191
+ protocol: "http",
192
+ controller: props.controller,
193
+ function: func,
194
+ name: props.naming(func.name, props.index),
195
+ toJSON: () => ({
196
+ protocol: "http",
197
+ controller: props.controller.name,
198
+ function: func.name,
199
+ name: props.naming(func.name, props.index)
200
+ })
201
+ })));
202
+ }
203
+
204
+ function toClassOperations(props) {
205
+ return props.controller.application.functions.map((func => ({
206
+ protocol: "class",
207
+ controller: props.controller,
208
+ function: func,
209
+ name: props.naming(func.name, props.index),
210
+ toJSON: () => ({
211
+ protocol: "class",
212
+ controller: props.controller.name,
213
+ function: func.name,
214
+ name: props.naming(func.name, props.index)
215
+ })
216
+ })));
217
+ }
218
+
219
+ function toMcpOperations(props) {
220
+ return props.controller.application.functions.map((func => ({
221
+ protocol: "mcp",
222
+ controller: props.controller,
223
+ function: func,
224
+ name: props.naming(func.name, props.index),
225
+ toJSON: () => ({
226
+ protocol: "mcp",
227
+ controller: props.controller.name,
228
+ function: func.name,
229
+ name: props.naming(func.name, props.index)
230
+ })
231
+ })));
232
+ }
233
+
165
234
  function divide(props) {
235
+ if (props.capacity <= 0) {
236
+ throw new Error("Capacity must be a positive integer");
237
+ }
238
+ if (Number.isNaN(props.capacity)) {
239
+ throw new TypeError("Capacity must be a positive integer");
240
+ }
241
+ if (props.capacity === Infinity) {
242
+ throw new Error("Capacity must be a positive integer");
243
+ }
166
244
  const size = Math.ceil(props.array.length / props.capacity);
167
245
  const capacity = Math.ceil(props.array.length / size);
168
246
  const replica = props.array.slice();
@@ -1101,12 +1179,9 @@ async function readAll(stream) {
1101
1179
 
1102
1180
  async function reduce(stream, reducer, initial) {
1103
1181
  const reader = stream.getReader();
1182
+ const iterator = streamDefaultReaderToAsyncGenerator(reader);
1104
1183
  let acc = initial ?? null;
1105
- while (true) {
1106
- const {done, value} = await reader.read();
1107
- if (done) {
1108
- break;
1109
- }
1184
+ for await (const value of iterator) {
1110
1185
  if (acc === null) {
1111
1186
  acc = value;
1112
1187
  continue;
@@ -1116,7 +1191,7 @@ async function reduce(stream, reducer, initial) {
1116
1191
  return acc;
1117
1192
  }
1118
1193
 
1119
- function to(value) {
1194
+ function from(value) {
1120
1195
  const stream = new ReadableStream({
1121
1196
  start: controller => {
1122
1197
  controller.enqueue(value);
@@ -1126,6 +1201,20 @@ function to(value) {
1126
1201
  return stream;
1127
1202
  }
1128
1203
 
1204
+ async function* toAsyncGenerator(value) {
1205
+ yield value;
1206
+ }
1207
+
1208
+ async function* streamDefaultReaderToAsyncGenerator(reader) {
1209
+ while (true) {
1210
+ const {done, value} = await reader.read();
1211
+ if (done) {
1212
+ break;
1213
+ }
1214
+ yield value;
1215
+ }
1216
+ }
1217
+
1129
1218
  function transform$1(stream, transformer) {
1130
1219
  const reader = stream.getReader();
1131
1220
  return new ReadableStream({
@@ -1143,7 +1232,7 @@ function transform$1(stream, transformer) {
1143
1232
  const StreamUtil = {
1144
1233
  readAll,
1145
1234
  reduce,
1146
- to,
1235
+ from,
1147
1236
  transform: transform$1
1148
1237
  };
1149
1238
 
@@ -1180,7 +1269,7 @@ async function call(ctx, operations) {
1180
1269
  function: {
1181
1270
  name: s.name,
1182
1271
  description: s.function.description,
1183
- parameters: s.function.separated !== undefined ? s.function.separated.llm ?? {
1272
+ parameters: "separated" in s.function && s.function.separated !== undefined ? s.function.separated.llm ?? {
1184
1273
  type: "object",
1185
1274
  properties: {},
1186
1275
  required: [],
@@ -1249,7 +1338,7 @@ async function call(ctx, operations) {
1249
1338
  role: "assistant",
1250
1339
  get: () => value.text,
1251
1340
  done: () => true,
1252
- stream: StreamUtil.to(value.text),
1341
+ stream: toAsyncGenerator(value.text),
1253
1342
  join: async () => Promise.resolve(value.text)
1254
1343
  })).catch((() => {}));
1255
1344
  return [ value ];
@@ -1260,85 +1349,148 @@ async function call(ctx, operations) {
1260
1349
  }
1261
1350
 
1262
1351
  async function propagate(ctx, call, retry) {
1263
- if (call.operation.protocol === "http") {
1264
- const check = call.operation.function.validate(call.arguments);
1265
- if (check.success === false) {
1266
- ctx.dispatch(createValidateEvent({
1267
- id: call.id,
1268
- operation: call.operation,
1269
- result: check
1270
- })).catch((() => {}));
1271
- if (retry++ < (ctx.config?.retry ?? AgenticaConstant.RETRY)) {
1272
- const trial = await correct(ctx, call, retry, check.errors);
1273
- if (trial !== null) {
1274
- return trial;
1275
- }
1276
- }
1277
- }
1278
- try {
1279
- const response = await executeHttpOperation(call.operation, call.arguments);
1280
- const success = ((response.status === 400 || response.status === 404 || response.status === 422) && retry++ < (ctx.config?.retry ?? AgenticaConstant.RETRY) && typeof response.body) === false;
1281
- return (success === false ? await correct(ctx, call, retry, response.body) : null) ?? createExecuteHistory({
1352
+ switch (call.operation.protocol) {
1353
+ case "http":
1354
+ {
1355
+ return propagateHttp({
1356
+ ctx,
1282
1357
  operation: call.operation,
1283
- id: call.id,
1284
- arguments: call.arguments,
1285
- value: response
1286
- });
1287
- } catch (error) {
1288
- return createExecuteHistory({
1289
- operation: call.operation,
1290
- id: call.id,
1291
- arguments: call.arguments,
1292
- value: {
1293
- status: 500,
1294
- headers: {},
1295
- body: error instanceof Error ? {
1296
- ...error,
1297
- name: error.name,
1298
- message: error.message
1299
- } : error
1300
- }
1358
+ call,
1359
+ retry
1301
1360
  });
1302
1361
  }
1303
- } else {
1304
- const check = call.operation.function.validate(call.arguments);
1305
- if (check.success === false) {
1306
- ctx.dispatch(createValidateEvent({
1307
- id: call.id,
1308
- operation: call.operation,
1309
- result: check
1310
- })).catch((() => {}));
1311
- return (retry++ < (ctx.config?.retry ?? AgenticaConstant.RETRY) ? await correct(ctx, call, retry, check.errors) : null) ?? createExecuteHistory({
1312
- id: call.id,
1362
+
1363
+ case "class":
1364
+ {
1365
+ return propagateClass({
1366
+ ctx,
1313
1367
  operation: call.operation,
1314
- arguments: call.arguments,
1315
- value: {
1316
- name: "TypeGuardError",
1317
- message: "Invalid arguments.",
1318
- errors: check.errors
1319
- }
1368
+ call,
1369
+ retry
1320
1370
  });
1321
1371
  }
1322
- try {
1323
- const value = await executeClassOperation(call.operation, call.arguments);
1324
- return createExecuteHistory({
1325
- id: call.id,
1372
+
1373
+ case "mcp":
1374
+ {
1375
+ return propagateMcp({
1376
+ ctx,
1326
1377
  operation: call.operation,
1327
- arguments: call.arguments,
1328
- value
1378
+ call,
1379
+ retry
1329
1380
  });
1330
- } catch (error) {
1331
- return createExecuteHistory({
1332
- id: call.id,
1333
- operation: call.operation,
1334
- arguments: call.arguments,
1335
- value: error instanceof Error ? {
1381
+ }
1382
+
1383
+ default:
1384
+ {
1385
+ call.operation;
1386
+ throw new Error("Unsupported protocol");
1387
+ }
1388
+ }
1389
+ }
1390
+
1391
+ async function propagateHttp(props) {
1392
+ const check = props.operation.function.validate(props.call.arguments);
1393
+ if (check.success === false) {
1394
+ props.ctx.dispatch(createValidateEvent({
1395
+ id: props.call.id,
1396
+ operation: props.operation,
1397
+ result: check
1398
+ })).catch((() => {}));
1399
+ if (props.retry++ < (props.ctx.config?.retry ?? AgenticaConstant.RETRY)) {
1400
+ const trial = await correct(props.ctx, props.call, props.retry, check.errors);
1401
+ if (trial !== null) {
1402
+ return trial;
1403
+ }
1404
+ }
1405
+ }
1406
+ try {
1407
+ const response = await executeHttpOperation(props.operation, props.call.arguments);
1408
+ const success = ((response.status === 400 || response.status === 404 || response.status === 422) && props.retry++ < (props.ctx.config?.retry ?? AgenticaConstant.RETRY) && typeof response.body) === false;
1409
+ return (success === false ? await correct(props.ctx, props.call, props.retry, response.body) : null) ?? createExecuteHistory({
1410
+ operation: props.call.operation,
1411
+ id: props.call.id,
1412
+ arguments: props.call.arguments,
1413
+ value: response
1414
+ });
1415
+ } catch (error) {
1416
+ return createExecuteHistory({
1417
+ operation: props.call.operation,
1418
+ id: props.call.id,
1419
+ arguments: props.call.arguments,
1420
+ value: {
1421
+ status: 500,
1422
+ headers: {},
1423
+ body: error instanceof Error ? {
1336
1424
  ...error,
1337
1425
  name: error.name,
1338
1426
  message: error.message
1339
1427
  } : error
1340
- });
1341
- }
1428
+ }
1429
+ });
1430
+ }
1431
+ }
1432
+
1433
+ async function propagateClass(props) {
1434
+ const check = props.operation.function.validate(props.call.arguments);
1435
+ if (check.success === false) {
1436
+ props.ctx.dispatch(createValidateEvent({
1437
+ id: props.call.id,
1438
+ operation: props.call.operation,
1439
+ result: check
1440
+ })).catch((() => {}));
1441
+ return (props.retry++ < (props.ctx.config?.retry ?? AgenticaConstant.RETRY) ? await correct(props.ctx, props.call, props.retry, check.errors) : null) ?? createExecuteHistory({
1442
+ id: props.call.id,
1443
+ operation: props.call.operation,
1444
+ arguments: props.call.arguments,
1445
+ value: {
1446
+ name: "TypeGuardError",
1447
+ message: "Invalid arguments.",
1448
+ errors: check.errors
1449
+ }
1450
+ });
1451
+ }
1452
+ try {
1453
+ const value = await executeClassOperation(props.operation, props.call.arguments);
1454
+ return createExecuteHistory({
1455
+ id: props.call.id,
1456
+ operation: props.call.operation,
1457
+ arguments: props.call.arguments,
1458
+ value
1459
+ });
1460
+ } catch (error) {
1461
+ return createExecuteHistory({
1462
+ id: props.call.id,
1463
+ operation: props.call.operation,
1464
+ arguments: props.call.arguments,
1465
+ value: error instanceof Error ? {
1466
+ ...error,
1467
+ name: error.name,
1468
+ message: error.message
1469
+ } : error
1470
+ });
1471
+ }
1472
+ }
1473
+
1474
+ async function propagateMcp(props) {
1475
+ try {
1476
+ const value = await executeMcpOperation(props.operation, props.call.arguments);
1477
+ return createExecuteHistory({
1478
+ id: props.call.id,
1479
+ operation: props.call.operation,
1480
+ arguments: props.call.arguments,
1481
+ value
1482
+ });
1483
+ } catch (error) {
1484
+ return createExecuteHistory({
1485
+ id: props.call.id,
1486
+ operation: props.call.operation,
1487
+ arguments: props.call.arguments,
1488
+ value: error instanceof Error ? {
1489
+ ...error,
1490
+ name: error.name,
1491
+ message: error.message
1492
+ } : error
1493
+ });
1342
1494
  }
1343
1495
  }
1344
1496
 
@@ -1369,6 +1521,36 @@ async function executeClassOperation(operation, operationArguments) {
1369
1521
  return execute[operation.function.name](operationArguments);
1370
1522
  }
1371
1523
 
1524
+ async function executeMcpOperation(operation, operationArguments) {
1525
+ const {Client} = await import("@modelcontextprotocol/sdk/client/index.js");
1526
+ const {SSEClientTransport} = await import("@modelcontextprotocol/sdk/client/sse.js");
1527
+ const {StdioClientTransport} = await import("@modelcontextprotocol/sdk/client/stdio.js");
1528
+ const client = new Client({
1529
+ name: operation.name,
1530
+ version: "1.0.0"
1531
+ });
1532
+ const transport = (() => {
1533
+ switch (operation.controller.application.transport.type) {
1534
+ case "sse":
1535
+ return new SSEClientTransport(operation.controller.application.transport.url);
1536
+
1537
+ case "stdio":
1538
+ return new StdioClientTransport(operation.controller.application.transport);
1539
+
1540
+ default:
1541
+ operation.controller.application.transport;
1542
+ throw new Error("Unsupported transport type");
1543
+ }
1544
+ })();
1545
+ await client.connect(transport);
1546
+ const result = await client.callTool({
1547
+ method: operation.function.name,
1548
+ name: operation.function.name,
1549
+ arguments: operationArguments
1550
+ });
1551
+ return result.content;
1552
+ }
1553
+
1372
1554
  async function correct(ctx, call, retry, error) {
1373
1555
  const completionStream = await ctx.request("call", {
1374
1556
  messages: [ {
@@ -1403,7 +1585,7 @@ async function correct(ctx, call, retry, error) {
1403
1585
  function: {
1404
1586
  name: call.operation.name,
1405
1587
  description: call.operation.function.description,
1406
- parameters: call.operation.function.separated !== undefined ? call.operation.function.separated?.llm ?? {
1588
+ parameters: "separated" in call.operation.function && call.operation.function.separated !== undefined ? call.operation.function.separated?.llm ?? {
1407
1589
  $defs: {},
1408
1590
  type: "object",
1409
1591
  properties: {},
@@ -1911,7 +2093,7 @@ async function describe(ctx, histories) {
1911
2093
  mpsc.produce(choice.delta.content);
1912
2094
  ctx.dispatch(createDescribeEvent({
1913
2095
  executes: histories,
1914
- stream: mpsc.consumer,
2096
+ stream: streamDefaultReaderToAsyncGenerator(mpsc.consumer.getReader()),
1915
2097
  done: () => mpsc.done(),
1916
2098
  get: () => describeContext[choice.index]?.content ?? "",
1917
2099
  join: async () => {
@@ -1965,6 +2147,8 @@ const FUNCTION = {
1965
2147
  title: "Type schema info of the ChatGPT",
1966
2148
  description: 'Type schema info of the ChatGPT.\n\n`IChatGptSchema` is a type schema info of the ChatGPT function calling.\n\n`IChatGptSchema` basically follows the JSON schema definition of the OpenAPI v3.1\nspeciifcation; {@link OpenApiV3_1.IJsonSchema}.\n\nHowever, the `IChatGptSchema` does not follow the entire specification of\nthe OpenAPI v3.1. It has own specific restrictions and definitions. Here is the\nlist of how `IChatGptSchema` is different with the OpenAPI v3.1 JSON schema.\n\n- Decompose mixed type: {@link OpenApiV3_1.IJsonSchema.IMixed}\n- Resolve nullable property: {@link OpenApiV3_1.IJsonSchema.__ISignificant.nullable}\n- Tuple type is banned: {@link OpenApiV3_1.IJsonSchema.ITuple.prefixItems}\n- Constant type is banned: {@link OpenApiV3_1.IJsonSchema.IConstant}\n- Merge {@link OpenApiV3_1.IJsonSchema.IOneOf} to {@link IChatGptSchema.IAnOf}\n- Merge {@link OpenApiV3_1.IJsonSchema.IAllOf} to {@link IChatGptSchema.IObject}\n- Merge {@link OpenApiV3_1.IJsonSchema.IRecursiveReference} to {@link IChatGptSchema.IReference}\n- When {@link IChatGptSchema.IConfig.strict} mode\n - Every object properties must be required\n - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n\nIf compare with the {@link OpenApi.IJsonSchema}, the emended JSON schema specification,\n\n- {@link IChatGptSchema.IAnyOf} instead of the {@link OpenApi.IJsonSchema.IOneOf}\n- {@link IChatGptSchema.IParameters.$defs} instead of the {@link OpenApi.IJsonSchema.IComponents.schemas}\n- {@link IChatGptSchema.IString.enum} instead of the {@link OpenApi.IJsonSchema.IConstant}\n- {@link IChatGptSchema.additionalProperties} is fixed to `false`\n- No tuple type {@link OpenApi.IJsonSchema.ITuple} support\n- When {@link IChatGptSchema.IConfig.strict} mode\n - Every object properties must be required\n - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n\nFor reference, if you\'ve composed the `IChatGptSchema` type with the\n{@link IChatGptSchema.IConfig.reference} `false` option (default is `false`),\nonly the recursived named types would be archived into the\n{@link IChatGptSchema.IParameters.$defs}, and the others would be ecaped from the\n{@link IChatGptSchema.IReference} type.\n\nAlso, OpenAI has banned below constraint properties. Instead, `IChatGptSchema`\nfills the {@link IChatGptSchema.__IAttribute.description} property with\nthe comment text like `"@format uuid"`.\n\n- {@link OpenApi.IJsonSchema.INumber.minimum}\n- {@link OpenApi.IJsonSchema.INumber.maximum}\n- {@link OpenApi.IJsonSchema.INumber.multipleOf}\n- {@link OpenApi.IJsonSchema.IString.minLength}\n- {@link OpenApi.IJsonSchema.IString.maxLength}\n- {@link OpenApi.IJsonSchema.IString.format}\n- {@link OpenApi.IJsonSchema.IString.pattern}\n- {@link OpenApi.IJsonSchema.IString.contentMediaType}\n- {@link OpenApi.IJsonSchema.IString.default}\n- {@link OpenApi.IJsonSchema.IArray.minItems}\n- {@link OpenApi.IJsonSchema.IArray.maxItems}\n- {@link OpenApi.IJsonSchema.IArray.unique}\n\nAdditionally, OpenAI cannot define the `description` property to the\n{@link IChatGptSchema.IReference} type, and even does not understand\nthe capsulization to the {@link IChatGptSchema.IAnyOf} type.\nTherefore, the `description` is written to the parent object type,\nnot the reference type.\n\n```json\n{\n "type": "object",\n "description": "### Description of {@link something} property.\\n\\n> Hello?",\n "properties": {\n "something": {\n "$ref": "#/$defs/SomeObject"\n }\n }\n}\n```',
1967
2149
  anyOf: [ {
2150
+ $ref: "#/$defs/IChatGptSchema.IObject"
2151
+ }, {
1968
2152
  type: "object",
1969
2153
  properties: {
1970
2154
  enum: {
@@ -2150,8 +2334,6 @@ const FUNCTION = {
2150
2334
  description: 'Description of the current {@link IChatGptSchema.IString} type:\n\n> String type info.\n\n------------------------------\n\nDescription of the parent {@link IChatGptSchema} type:\n\n> Type schema info of the ChatGPT.\n> \n> `IChatGptSchema` is a type schema info of the ChatGPT function calling.\n> \n> `IChatGptSchema` basically follows the JSON schema definition of the OpenAPI v3.1\n> speciifcation; {@link OpenApiV3_1.IJsonSchema}.\n> \n> However, the `IChatGptSchema` does not follow the entire specification of\n> the OpenAPI v3.1. It has own specific restrictions and definitions. Here is the\n> list of how `IChatGptSchema` is different with the OpenAPI v3.1 JSON schema.\n> \n> - Decompose mixed type: {@link OpenApiV3_1.IJsonSchema.IMixed}\n> - Resolve nullable property: {@link OpenApiV3_1.IJsonSchema.__ISignificant.nullable}\n> - Tuple type is banned: {@link OpenApiV3_1.IJsonSchema.ITuple.prefixItems}\n> - Constant type is banned: {@link OpenApiV3_1.IJsonSchema.IConstant}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IOneOf} to {@link IChatGptSchema.IAnOf}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IAllOf} to {@link IChatGptSchema.IObject}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IRecursiveReference} to {@link IChatGptSchema.IReference}\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> If compare with the {@link OpenApi.IJsonSchema}, the emended JSON schema specification,\n> \n> - {@link IChatGptSchema.IAnyOf} instead of the {@link OpenApi.IJsonSchema.IOneOf}\n> - {@link IChatGptSchema.IParameters.$defs} instead of the {@link OpenApi.IJsonSchema.IComponents.schemas}\n> - {@link IChatGptSchema.IString.enum} instead of the {@link OpenApi.IJsonSchema.IConstant}\n> - {@link IChatGptSchema.additionalProperties} is fixed to `false`\n> - No tuple type {@link OpenApi.IJsonSchema.ITuple} support\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> For reference, if you\'ve composed the `IChatGptSchema` type with the\n> {@link IChatGptSchema.IConfig.reference} `false` option (default is `false`),\n> only the recursived named types would be archived into the\n> {@link IChatGptSchema.IParameters.$defs}, and the others would be ecaped from the\n> {@link IChatGptSchema.IReference} type.\n> \n> Also, OpenAI has banned below constraint properties. Instead, `IChatGptSchema`\n> fills the {@link IChatGptSchema.__IAttribute.description} property with\n> the comment text like `"@format uuid"`.\n> \n> - {@link OpenApi.IJsonSchema.INumber.minimum}\n> - {@link OpenApi.IJsonSchema.INumber.maximum}\n> - {@link OpenApi.IJsonSchema.INumber.multipleOf}\n> - {@link OpenApi.IJsonSchema.IString.minLength}\n> - {@link OpenApi.IJsonSchema.IString.maxLength}\n> - {@link OpenApi.IJsonSchema.IString.format}\n> - {@link OpenApi.IJsonSchema.IString.pattern}\n> - {@link OpenApi.IJsonSchema.IString.contentMediaType}\n> - {@link OpenApi.IJsonSchema.IString.default}\n> - {@link OpenApi.IJsonSchema.IArray.minItems}\n> - {@link OpenApi.IJsonSchema.IArray.maxItems}\n> - {@link OpenApi.IJsonSchema.IArray.unique}\n> \n> Additionally, OpenAI cannot define the `description` property to the\n> {@link IChatGptSchema.IReference} type, and even does not understand\n> the capsulization to the {@link IChatGptSchema.IAnyOf} type.\n> Therefore, the `description` is written to the parent object type,\n> not the reference type.\n> \n> ```json\n> {\n> "type": "object",\n> "description": "### Description of {@link something} property.\\n\\n> Hello?",\n> "properties": {\n> "something": {\n> "$ref": "#/$defs/SomeObject"\n> }\n> }\n> }\n> ```'
2151
2335
  }, {
2152
2336
  $ref: "#/$defs/IChatGptSchema.IArray"
2153
- }, {
2154
- $ref: "#/$defs/IChatGptSchema.IObject"
2155
2337
  }, {
2156
2338
  type: "object",
2157
2339
  properties: {
@@ -2263,49 +2445,6 @@ const FUNCTION = {
2263
2445
  description: 'Description of the current {@link IChatGptSchema.IUnknown} type:\n\n> Unknown, the `any` type.\n\n------------------------------\n\nDescription of the parent {@link IChatGptSchema} type:\n\n> Type schema info of the ChatGPT.\n> \n> `IChatGptSchema` is a type schema info of the ChatGPT function calling.\n> \n> `IChatGptSchema` basically follows the JSON schema definition of the OpenAPI v3.1\n> speciifcation; {@link OpenApiV3_1.IJsonSchema}.\n> \n> However, the `IChatGptSchema` does not follow the entire specification of\n> the OpenAPI v3.1. It has own specific restrictions and definitions. Here is the\n> list of how `IChatGptSchema` is different with the OpenAPI v3.1 JSON schema.\n> \n> - Decompose mixed type: {@link OpenApiV3_1.IJsonSchema.IMixed}\n> - Resolve nullable property: {@link OpenApiV3_1.IJsonSchema.__ISignificant.nullable}\n> - Tuple type is banned: {@link OpenApiV3_1.IJsonSchema.ITuple.prefixItems}\n> - Constant type is banned: {@link OpenApiV3_1.IJsonSchema.IConstant}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IOneOf} to {@link IChatGptSchema.IAnOf}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IAllOf} to {@link IChatGptSchema.IObject}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IRecursiveReference} to {@link IChatGptSchema.IReference}\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> If compare with the {@link OpenApi.IJsonSchema}, the emended JSON schema specification,\n> \n> - {@link IChatGptSchema.IAnyOf} instead of the {@link OpenApi.IJsonSchema.IOneOf}\n> - {@link IChatGptSchema.IParameters.$defs} instead of the {@link OpenApi.IJsonSchema.IComponents.schemas}\n> - {@link IChatGptSchema.IString.enum} instead of the {@link OpenApi.IJsonSchema.IConstant}\n> - {@link IChatGptSchema.additionalProperties} is fixed to `false`\n> - No tuple type {@link OpenApi.IJsonSchema.ITuple} support\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> For reference, if you\'ve composed the `IChatGptSchema` type with the\n> {@link IChatGptSchema.IConfig.reference} `false` option (default is `false`),\n> only the recursived named types would be archived into the\n> {@link IChatGptSchema.IParameters.$defs}, and the others would be ecaped from the\n> {@link IChatGptSchema.IReference} type.\n> \n> Also, OpenAI has banned below constraint properties. Instead, `IChatGptSchema`\n> fills the {@link IChatGptSchema.__IAttribute.description} property with\n> the comment text like `"@format uuid"`.\n> \n> - {@link OpenApi.IJsonSchema.INumber.minimum}\n> - {@link OpenApi.IJsonSchema.INumber.maximum}\n> - {@link OpenApi.IJsonSchema.INumber.multipleOf}\n> - {@link OpenApi.IJsonSchema.IString.minLength}\n> - {@link OpenApi.IJsonSchema.IString.maxLength}\n> - {@link OpenApi.IJsonSchema.IString.format}\n> - {@link OpenApi.IJsonSchema.IString.pattern}\n> - {@link OpenApi.IJsonSchema.IString.contentMediaType}\n> - {@link OpenApi.IJsonSchema.IString.default}\n> - {@link OpenApi.IJsonSchema.IArray.minItems}\n> - {@link OpenApi.IJsonSchema.IArray.maxItems}\n> - {@link OpenApi.IJsonSchema.IArray.unique}\n> \n> Additionally, OpenAI cannot define the `description` property to the\n> {@link IChatGptSchema.IReference} type, and even does not understand\n> the capsulization to the {@link IChatGptSchema.IAnyOf} type.\n> Therefore, the `description` is written to the parent object type,\n> not the reference type.\n> \n> ```json\n> {\n> "type": "object",\n> "description": "### Description of {@link something} property.\\n\\n> Hello?",\n> "properties": {\n> "something": {\n> "$ref": "#/$defs/SomeObject"\n> }\n> }\n> }\n> ```'
2264
2446
  } ]
2265
2447
  },
2266
- "IChatGptSchema.IArray": {
2267
- description: "Array type info.\n\n### Description of {@link items} property:\n\n> Items type info.\n> \n> The `items` means the type of the array elements. In other words, it is\n> the type schema info of the `T` in the TypeScript array type `Array<T>`.",
2268
- type: "object",
2269
- properties: {
2270
- items: {
2271
- title: "Items type info",
2272
- $ref: "#/$defs/IChatGptSchema"
2273
- },
2274
- type: {
2275
- title: "Discriminator value of the type",
2276
- description: "Discriminator value of the type.",
2277
- type: "string",
2278
- enum: [ "array" ]
2279
- },
2280
- title: {
2281
- title: "Title of the schema",
2282
- description: "Title of the schema.",
2283
- type: "string"
2284
- },
2285
- description: {
2286
- title: "Detailed description of the schema",
2287
- description: "Detailed description of the schema.",
2288
- type: "string"
2289
- },
2290
- deprecated: {
2291
- title: "Whether the type is deprecated or not",
2292
- description: "Whether the type is deprecated or not.",
2293
- type: "boolean"
2294
- },
2295
- example: {
2296
- title: "Example value",
2297
- description: "Example value."
2298
- },
2299
- examples: {
2300
- description: "List of example values as key-value pairs.\n\n------------------------------\n\nDescription of the current {@link Recordstringany} type:\n\n> Construct a type with a set of properties K of type T",
2301
- type: "object",
2302
- properties: {},
2303
- required: [],
2304
- additionalProperties: {}
2305
- }
2306
- },
2307
- required: [ "items", "type" ]
2308
- },
2309
2448
  "IChatGptSchema.IObject": {
2310
2449
  description: "Object type info.\n\n### Description of {@link properties} property:\n\n> Properties of the object.\n> \n> The `properties` means a list of key-value pairs of the object's\n> regular properties. The key is the name of the regular property,\n> and the value is the type schema info.",
2311
2450
  type: "object",
@@ -2319,6 +2458,8 @@ const FUNCTION = {
2319
2458
  description: "Additional properties' info.\n\nThe `additionalProperties` means the type schema info of the additional\nproperties that are not listed in the {@link properties}.\n\nBy the way, if you've configured {@link IChatGptSchema.IConfig.strict} as `true`,\nChatGPT function calling does not support such dynamic key typed properties, so\nthe `additionalProperties` becomes always `false`.",
2320
2459
  anyOf: [ {
2321
2460
  type: "boolean"
2461
+ }, {
2462
+ $ref: "#/$defs/IChatGptSchema.IObject"
2322
2463
  }, {
2323
2464
  type: "object",
2324
2465
  properties: {
@@ -2505,8 +2646,6 @@ const FUNCTION = {
2505
2646
  description: 'Description of the current {@link IChatGptSchema.IBoolean} type:\n\n> Boolean type info.\n\n------------------------------\n\nDescription of the parent {@link IChatGptSchema} type:\n\n> Type schema info of the ChatGPT.\n> \n> `IChatGptSchema` is a type schema info of the ChatGPT function calling.\n> \n> `IChatGptSchema` basically follows the JSON schema definition of the OpenAPI v3.1\n> speciifcation; {@link OpenApiV3_1.IJsonSchema}.\n> \n> However, the `IChatGptSchema` does not follow the entire specification of\n> the OpenAPI v3.1. It has own specific restrictions and definitions. Here is the\n> list of how `IChatGptSchema` is different with the OpenAPI v3.1 JSON schema.\n> \n> - Decompose mixed type: {@link OpenApiV3_1.IJsonSchema.IMixed}\n> - Resolve nullable property: {@link OpenApiV3_1.IJsonSchema.__ISignificant.nullable}\n> - Tuple type is banned: {@link OpenApiV3_1.IJsonSchema.ITuple.prefixItems}\n> - Constant type is banned: {@link OpenApiV3_1.IJsonSchema.IConstant}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IOneOf} to {@link IChatGptSchema.IAnOf}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IAllOf} to {@link IChatGptSchema.IObject}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IRecursiveReference} to {@link IChatGptSchema.IReference}\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> If compare with the {@link OpenApi.IJsonSchema}, the emended JSON schema specification,\n> \n> - {@link IChatGptSchema.IAnyOf} instead of the {@link OpenApi.IJsonSchema.IOneOf}\n> - {@link IChatGptSchema.IParameters.$defs} instead of the {@link OpenApi.IJsonSchema.IComponents.schemas}\n> - {@link IChatGptSchema.IString.enum} instead of the {@link OpenApi.IJsonSchema.IConstant}\n> - {@link IChatGptSchema.additionalProperties} is fixed to `false`\n> - No tuple type {@link OpenApi.IJsonSchema.ITuple} support\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> For reference, if you\'ve composed the `IChatGptSchema` type with the\n> {@link IChatGptSchema.IConfig.reference} `false` option (default is `false`),\n> only the recursived named types would be archived into the\n> {@link IChatGptSchema.IParameters.$defs}, and the others would be ecaped from the\n> {@link IChatGptSchema.IReference} type.\n> \n> Also, OpenAI has banned below constraint properties. Instead, `IChatGptSchema`\n> fills the {@link IChatGptSchema.__IAttribute.description} property with\n> the comment text like `"@format uuid"`.\n> \n> - {@link OpenApi.IJsonSchema.INumber.minimum}\n> - {@link OpenApi.IJsonSchema.INumber.maximum}\n> - {@link OpenApi.IJsonSchema.INumber.multipleOf}\n> - {@link OpenApi.IJsonSchema.IString.minLength}\n> - {@link OpenApi.IJsonSchema.IString.maxLength}\n> - {@link OpenApi.IJsonSchema.IString.format}\n> - {@link OpenApi.IJsonSchema.IString.pattern}\n> - {@link OpenApi.IJsonSchema.IString.contentMediaType}\n> - {@link OpenApi.IJsonSchema.IString.default}\n> - {@link OpenApi.IJsonSchema.IArray.minItems}\n> - {@link OpenApi.IJsonSchema.IArray.maxItems}\n> - {@link OpenApi.IJsonSchema.IArray.unique}\n> \n> Additionally, OpenAI cannot define the `description` property to the\n> {@link IChatGptSchema.IReference} type, and even does not understand\n> the capsulization to the {@link IChatGptSchema.IAnyOf} type.\n> Therefore, the `description` is written to the parent object type,\n> not the reference type.\n> \n> ```json\n> {\n> "type": "object",\n> "description": "### Description of {@link something} property.\\n\\n> Hello?",\n> "properties": {\n> "something": {\n> "$ref": "#/$defs/SomeObject"\n> }\n> }\n> }\n> ```'
2506
2647
  }, {
2507
2648
  $ref: "#/$defs/IChatGptSchema.IArray"
2508
- }, {
2509
- $ref: "#/$defs/IChatGptSchema.IObject"
2510
2649
  }, {
2511
2650
  type: "object",
2512
2651
  properties: {
@@ -2661,6 +2800,49 @@ const FUNCTION = {
2661
2800
  },
2662
2801
  required: [ "properties", "required", "type" ]
2663
2802
  },
2803
+ "IChatGptSchema.IArray": {
2804
+ description: "Array type info.\n\n### Description of {@link items} property:\n\n> Items type info.\n> \n> The `items` means the type of the array elements. In other words, it is\n> the type schema info of the `T` in the TypeScript array type `Array<T>`.",
2805
+ type: "object",
2806
+ properties: {
2807
+ items: {
2808
+ title: "Items type info",
2809
+ $ref: "#/$defs/IChatGptSchema"
2810
+ },
2811
+ type: {
2812
+ title: "Discriminator value of the type",
2813
+ description: "Discriminator value of the type.",
2814
+ type: "string",
2815
+ enum: [ "array" ]
2816
+ },
2817
+ title: {
2818
+ title: "Title of the schema",
2819
+ description: "Title of the schema.",
2820
+ type: "string"
2821
+ },
2822
+ description: {
2823
+ title: "Detailed description of the schema",
2824
+ description: "Detailed description of the schema.",
2825
+ type: "string"
2826
+ },
2827
+ deprecated: {
2828
+ title: "Whether the type is deprecated or not",
2829
+ description: "Whether the type is deprecated or not.",
2830
+ type: "boolean"
2831
+ },
2832
+ example: {
2833
+ title: "Example value",
2834
+ description: "Example value."
2835
+ },
2836
+ examples: {
2837
+ description: "List of example values as key-value pairs.\n\n------------------------------\n\nDescription of the current {@link Recordstringany} type:\n\n> Construct a type with a set of properties K of type T",
2838
+ type: "object",
2839
+ properties: {},
2840
+ required: [],
2841
+ additionalProperties: {}
2842
+ }
2843
+ },
2844
+ required: [ "items", "type" ]
2845
+ },
2664
2846
  "IChatGptSchema.IAnyOf": {
2665
2847
  description: "Union type.\n\nIOneOf` represents an union type of the TypeScript (`A | B | C`).\n\nFor reference, even though your Swagger (or OpenAPI) document has\ndefined `anyOf` instead of the `oneOf`, {@link IChatGptSchema} forcibly\nconverts it to `oneOf` type.",
2666
2848
  type: "object",
@@ -2671,6 +2853,8 @@ const FUNCTION = {
2671
2853
  type: "array",
2672
2854
  items: {
2673
2855
  anyOf: [ {
2856
+ $ref: "#/$defs/IChatGptSchema.IObject"
2857
+ }, {
2674
2858
  type: "object",
2675
2859
  properties: {
2676
2860
  enum: {
@@ -2856,8 +3040,6 @@ const FUNCTION = {
2856
3040
  description: 'Description of the current {@link IChatGptSchema.IBoolean} type:\n\n> Boolean type info.\n\n------------------------------\n\nDescription of the parent {@link IChatGptSchema} type:\n\n> Type schema info of the ChatGPT.\n> \n> `IChatGptSchema` is a type schema info of the ChatGPT function calling.\n> \n> `IChatGptSchema` basically follows the JSON schema definition of the OpenAPI v3.1\n> speciifcation; {@link OpenApiV3_1.IJsonSchema}.\n> \n> However, the `IChatGptSchema` does not follow the entire specification of\n> the OpenAPI v3.1. It has own specific restrictions and definitions. Here is the\n> list of how `IChatGptSchema` is different with the OpenAPI v3.1 JSON schema.\n> \n> - Decompose mixed type: {@link OpenApiV3_1.IJsonSchema.IMixed}\n> - Resolve nullable property: {@link OpenApiV3_1.IJsonSchema.__ISignificant.nullable}\n> - Tuple type is banned: {@link OpenApiV3_1.IJsonSchema.ITuple.prefixItems}\n> - Constant type is banned: {@link OpenApiV3_1.IJsonSchema.IConstant}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IOneOf} to {@link IChatGptSchema.IAnOf}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IAllOf} to {@link IChatGptSchema.IObject}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IRecursiveReference} to {@link IChatGptSchema.IReference}\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> If compare with the {@link OpenApi.IJsonSchema}, the emended JSON schema specification,\n> \n> - {@link IChatGptSchema.IAnyOf} instead of the {@link OpenApi.IJsonSchema.IOneOf}\n> - {@link IChatGptSchema.IParameters.$defs} instead of the {@link OpenApi.IJsonSchema.IComponents.schemas}\n> - {@link IChatGptSchema.IString.enum} instead of the {@link OpenApi.IJsonSchema.IConstant}\n> - {@link IChatGptSchema.additionalProperties} is fixed to `false`\n> - No tuple type {@link OpenApi.IJsonSchema.ITuple} support\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> For reference, if you\'ve composed the `IChatGptSchema` type with the\n> {@link IChatGptSchema.IConfig.reference} `false` option (default is `false`),\n> only the recursived named types would be archived into the\n> {@link IChatGptSchema.IParameters.$defs}, and the others would be ecaped from the\n> {@link IChatGptSchema.IReference} type.\n> \n> Also, OpenAI has banned below constraint properties. Instead, `IChatGptSchema`\n> fills the {@link IChatGptSchema.__IAttribute.description} property with\n> the comment text like `"@format uuid"`.\n> \n> - {@link OpenApi.IJsonSchema.INumber.minimum}\n> - {@link OpenApi.IJsonSchema.INumber.maximum}\n> - {@link OpenApi.IJsonSchema.INumber.multipleOf}\n> - {@link OpenApi.IJsonSchema.IString.minLength}\n> - {@link OpenApi.IJsonSchema.IString.maxLength}\n> - {@link OpenApi.IJsonSchema.IString.format}\n> - {@link OpenApi.IJsonSchema.IString.pattern}\n> - {@link OpenApi.IJsonSchema.IString.contentMediaType}\n> - {@link OpenApi.IJsonSchema.IString.default}\n> - {@link OpenApi.IJsonSchema.IArray.minItems}\n> - {@link OpenApi.IJsonSchema.IArray.maxItems}\n> - {@link OpenApi.IJsonSchema.IArray.unique}\n> \n> Additionally, OpenAI cannot define the `description` property to the\n> {@link IChatGptSchema.IReference} type, and even does not understand\n> the capsulization to the {@link IChatGptSchema.IAnyOf} type.\n> Therefore, the `description` is written to the parent object type,\n> not the reference type.\n> \n> ```json\n> {\n> "type": "object",\n> "description": "### Description of {@link something} property.\\n\\n> Hello?",\n> "properties": {\n> "something": {\n> "$ref": "#/$defs/SomeObject"\n> }\n> }\n> }\n> ```'
2857
3041
  }, {
2858
3042
  $ref: "#/$defs/IChatGptSchema.IArray"
2859
- }, {
2860
- $ref: "#/$defs/IChatGptSchema.IObject"
2861
3043
  }, {
2862
3044
  type: "object",
2863
3045
  properties: {
@@ -3221,6 +3403,8 @@ const FUNCTION = {
3221
3403
  title: "Expected return type",
3222
3404
  description: "Expected return type.\n\nIf the target operation returns nothing (`void`), the `output`\nwould be `undefined`.",
3223
3405
  anyOf: [ {
3406
+ $ref: "#/$defs/IChatGptSchema.IObject"
3407
+ }, {
3224
3408
  type: "object",
3225
3409
  properties: {
3226
3410
  enum: {
@@ -3406,8 +3590,6 @@ const FUNCTION = {
3406
3590
  description: 'Description of the current {@link IChatGptSchema.IBoolean} type:\n\n> Boolean type info.\n\n------------------------------\n\nDescription of the parent {@link IChatGptSchema} type:\n\n> Type schema info of the ChatGPT.\n> \n> `IChatGptSchema` is a type schema info of the ChatGPT function calling.\n> \n> `IChatGptSchema` basically follows the JSON schema definition of the OpenAPI v3.1\n> speciifcation; {@link OpenApiV3_1.IJsonSchema}.\n> \n> However, the `IChatGptSchema` does not follow the entire specification of\n> the OpenAPI v3.1. It has own specific restrictions and definitions. Here is the\n> list of how `IChatGptSchema` is different with the OpenAPI v3.1 JSON schema.\n> \n> - Decompose mixed type: {@link OpenApiV3_1.IJsonSchema.IMixed}\n> - Resolve nullable property: {@link OpenApiV3_1.IJsonSchema.__ISignificant.nullable}\n> - Tuple type is banned: {@link OpenApiV3_1.IJsonSchema.ITuple.prefixItems}\n> - Constant type is banned: {@link OpenApiV3_1.IJsonSchema.IConstant}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IOneOf} to {@link IChatGptSchema.IAnOf}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IAllOf} to {@link IChatGptSchema.IObject}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IRecursiveReference} to {@link IChatGptSchema.IReference}\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> If compare with the {@link OpenApi.IJsonSchema}, the emended JSON schema specification,\n> \n> - {@link IChatGptSchema.IAnyOf} instead of the {@link OpenApi.IJsonSchema.IOneOf}\n> - {@link IChatGptSchema.IParameters.$defs} instead of the {@link OpenApi.IJsonSchema.IComponents.schemas}\n> - {@link IChatGptSchema.IString.enum} instead of the {@link OpenApi.IJsonSchema.IConstant}\n> - {@link IChatGptSchema.additionalProperties} is fixed to `false`\n> - No tuple type {@link OpenApi.IJsonSchema.ITuple} support\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> For reference, if you\'ve composed the `IChatGptSchema` type with the\n> {@link IChatGptSchema.IConfig.reference} `false` option (default is `false`),\n> only the recursived named types would be archived into the\n> {@link IChatGptSchema.IParameters.$defs}, and the others would be ecaped from the\n> {@link IChatGptSchema.IReference} type.\n> \n> Also, OpenAI has banned below constraint properties. Instead, `IChatGptSchema`\n> fills the {@link IChatGptSchema.__IAttribute.description} property with\n> the comment text like `"@format uuid"`.\n> \n> - {@link OpenApi.IJsonSchema.INumber.minimum}\n> - {@link OpenApi.IJsonSchema.INumber.maximum}\n> - {@link OpenApi.IJsonSchema.INumber.multipleOf}\n> - {@link OpenApi.IJsonSchema.IString.minLength}\n> - {@link OpenApi.IJsonSchema.IString.maxLength}\n> - {@link OpenApi.IJsonSchema.IString.format}\n> - {@link OpenApi.IJsonSchema.IString.pattern}\n> - {@link OpenApi.IJsonSchema.IString.contentMediaType}\n> - {@link OpenApi.IJsonSchema.IString.default}\n> - {@link OpenApi.IJsonSchema.IArray.minItems}\n> - {@link OpenApi.IJsonSchema.IArray.maxItems}\n> - {@link OpenApi.IJsonSchema.IArray.unique}\n> \n> Additionally, OpenAI cannot define the `description` property to the\n> {@link IChatGptSchema.IReference} type, and even does not understand\n> the capsulization to the {@link IChatGptSchema.IAnyOf} type.\n> Therefore, the `description` is written to the parent object type,\n> not the reference type.\n> \n> ```json\n> {\n> "type": "object",\n> "description": "### Description of {@link something} property.\\n\\n> Hello?",\n> "properties": {\n> "something": {\n> "$ref": "#/$defs/SomeObject"\n> }\n> }\n> }\n> ```'
3407
3591
  }, {
3408
3592
  $ref: "#/$defs/IChatGptSchema.IArray"
3409
- }, {
3410
- $ref: "#/$defs/IChatGptSchema.IObject"
3411
3593
  }, {
3412
3594
  type: "object",
3413
3595
  properties: {
@@ -3628,7 +3810,7 @@ async function initialize(ctx) {
3628
3810
  mpsc.produce(choice.delta.content);
3629
3811
  ctx.dispatch(createTextEvent({
3630
3812
  role: "assistant",
3631
- stream: mpsc.consumer,
3813
+ stream: streamDefaultReaderToAsyncGenerator(mpsc.consumer.getReader()),
3632
3814
  done: () => mpsc.done(),
3633
3815
  get: () => textContext[choice.index].content,
3634
3816
  join: async () => {
@@ -3990,7 +4172,7 @@ async function step(ctx, operations, retry, failures) {
3990
4172
  prompts.push(text);
3991
4173
  ctx.dispatch(createTextEvent({
3992
4174
  role: "assistant",
3993
- stream: StreamUtil.to(text.text),
4175
+ stream: toAsyncGenerator(text.text),
3994
4176
  join: async () => Promise.resolve(text.text),
3995
4177
  done: () => true,
3996
4178
  get: () => text.text
@@ -4182,7 +4364,7 @@ class Agentica {
4182
4364
  });
4183
4365
  this.dispatch(createTextEvent({
4184
4366
  role: "user",
4185
- stream: StreamUtil.to(content),
4367
+ stream: toAsyncGenerator(content),
4186
4368
  done: () => true,
4187
4369
  get: () => content,
4188
4370
  join: async () => Promise.resolve(content)
@@ -4259,7 +4441,7 @@ class Agentica {
4259
4441
  await dispatch({
4260
4442
  type: "response",
4261
4443
  source,
4262
- stream: streamForStream,
4444
+ stream: streamDefaultReaderToAsyncGenerator(streamForStream.getReader()),
4263
4445
  body: event.body,
4264
4446
  options: event.options,
4265
4447
  join: async () => {
@@ -4465,14 +4647,14 @@ function assertHttpLlmApplication(props) {
4465
4647
  if (undefined === value) return true;
4466
4648
  return "object" === typeof value && null !== value && _iu13(value);
4467
4649
  }));
4468
- const _io79 = input => (undefined === input.name || "string" === typeof input.name) && (undefined === input.required || "boolean" === typeof input.required) && (undefined === input.description || "string" === typeof input.description) && true && (undefined === input.examples || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io75(input.examples)) && ("object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) && _iu3(input.schema));
4650
+ const _io79 = input => (undefined === input.required || "boolean" === typeof input.required) && (undefined === input.description || "string" === typeof input.description) && true && (undefined === input.examples || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io75(input.examples)) && (undefined === input.name || "string" === typeof input.name) && ("object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) && _iu3(input.schema));
4469
4651
  const _io80 = input => "string" === typeof input.$ref && RegExp(/^#\/components\/headers\/(.*)/).test(input.$ref) && (null !== input.examples && (undefined === input.examples || (Array.isArray(input.examples) || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io58(input.examples)))) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && true;
4470
4652
  const _io81 = input => Object.keys(input).every((key => {
4471
4653
  const value = input[key];
4472
4654
  if (undefined === value) return true;
4473
4655
  return "object" === typeof value && null !== value && _io82(value);
4474
4656
  }));
4475
- const _io82 = input => (undefined === input.name || "string" === typeof input.name) && ("query" === input["in"] || "header" === input["in"] || "cookie" === input["in"] || "path" === input["in"]) && ("object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) && _iu3(input.schema)) && (undefined === input.required || "boolean" === typeof input.required) && (undefined === input.description || "string" === typeof input.description) && true && (undefined === input.examples || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io75(input.examples));
4657
+ const _io82 = input => (undefined === input.name || "string" === typeof input.name) && ("path" === input["in"] || "query" === input["in"] || "header" === input["in"] || "cookie" === input["in"]) && ("object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) && _iu3(input.schema)) && (undefined === input.required || "boolean" === typeof input.required) && (undefined === input.description || "string" === typeof input.description) && true && (undefined === input.examples || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io75(input.examples));
4476
4658
  const _io83 = input => Object.keys(input).every((key => {
4477
4659
  const value = input[key];
4478
4660
  if (undefined === value) return true;
@@ -4536,7 +4718,7 @@ function assertHttpLlmApplication(props) {
4536
4718
  if (undefined === value) return true;
4537
4719
  return "object" === typeof value && null !== value && false === Array.isArray(value) && _iu5(value);
4538
4720
  }));
4539
- const _io114 = input => Array.isArray(input.type) && input.type.every((elem => "string" === elem || "number" === elem || "boolean" === elem || "object" === elem || "integer" === elem || "array" === elem || "null" === elem)) && (null === input["default"] || undefined === input["default"] || Array.isArray(input["default"])) && (undefined === input["enum"] || Array.isArray(input["enum"])) && ("string" === typeof input["const"] || "number" === typeof input["const"] || "boolean" === typeof input["const"]) && (undefined === input.nullable || "boolean" === typeof input.nullable) && (null !== input.examples && (undefined === input.examples || (Array.isArray(input.examples) || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io58(input.examples)))) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && true && (undefined === input.minimum || "number" === typeof input.minimum) && (undefined === input.maximum || "number" === typeof input.maximum) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum || "boolean" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum || "boolean" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && 0 < input.multipleOf) && (undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 0x10000000000000000)) && (undefined === input.format || "string" === typeof input.format) && (undefined === input.pattern || "string" === typeof input.pattern) && (undefined === input.contentMediaType || "string" === typeof input.contentMediaType) && (undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 0x10000000000000000)) && (null !== input.items && (undefined === input.items || (Array.isArray(input.items) && input.items.every((elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && _iu5(elem))) || "object" === typeof input.items && null !== input.items && false === Array.isArray(input.items) && _iu5(input.items)))) && (undefined === input.prefixItems || Array.isArray(input.prefixItems) && input.prefixItems.every((elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && _iu5(elem)))) && (undefined === input.uniqueItems || "boolean" === typeof input.uniqueItems) && (null !== input.additionalItems && (undefined === input.additionalItems || "boolean" === typeof input.additionalItems || "object" === typeof input.additionalItems && null !== input.additionalItems && false === Array.isArray(input.additionalItems) && _iu5(input.additionalItems))) && (undefined === input.minItems || "number" === typeof input.minItems && (Math.floor(input.minItems) === input.minItems && 0 <= input.minItems && input.minItems <= 0x10000000000000000)) && (undefined === input.maxItems || "number" === typeof input.maxItems && (Math.floor(input.maxItems) === input.maxItems && 0 <= input.maxItems && input.maxItems <= 0x10000000000000000)) && (null !== input.additionalProperties && (undefined === input.additionalProperties || "boolean" === typeof input.additionalProperties || "object" === typeof input.additionalProperties && null !== input.additionalProperties && false === Array.isArray(input.additionalProperties) && _iu5(input.additionalProperties))) && (undefined === input.properties || "object" === typeof input.properties && null !== input.properties && false === Array.isArray(input.properties) && _io113(input.properties)) && (undefined === input.required || Array.isArray(input.required) && input.required.every((elem => "string" === typeof elem))) && (undefined === input.maxProperties || "number" === typeof input.maxProperties) && (undefined === input.minProperties || "number" === typeof input.minProperties) && (Array.isArray(input.oneOf) && input.oneOf.every((elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && _iu5(elem)))) && (undefined === input.discriminator || "object" === typeof input.discriminator && null !== input.discriminator && _io127(input.discriminator)) && (Array.isArray(input.anyOf) && input.anyOf.every((elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && _iu5(elem)))) && (Array.isArray(input.allOf) && input.allOf.every((elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && _iu5(elem)))) && "string" === typeof input.$ref;
4721
+ const _io114 = input => Array.isArray(input.type) && input.type.every((elem => "string" === elem || "number" === elem || "boolean" === elem || "object" === elem || "integer" === elem || "array" === elem || "null" === elem)) && (null === input["default"] || undefined === input["default"] || Array.isArray(input["default"])) && (undefined === input["enum"] || Array.isArray(input["enum"])) && ("string" === typeof input["const"] || "number" === typeof input["const"] || "boolean" === typeof input["const"]) && (undefined === input.nullable || "boolean" === typeof input.nullable) && (null !== input.examples && (undefined === input.examples || (Array.isArray(input.examples) || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io58(input.examples)))) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && true && (undefined === input.minimum || "number" === typeof input.minimum) && (undefined === input.maximum || "number" === typeof input.maximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && 0 < input.multipleOf) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum || "boolean" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum || "boolean" === typeof input.exclusiveMaximum) && (undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 0x10000000000000000)) && (undefined === input.format || "string" === typeof input.format) && (undefined === input.pattern || "string" === typeof input.pattern) && (undefined === input.contentMediaType || "string" === typeof input.contentMediaType) && (undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 0x10000000000000000)) && (null !== input.items && (undefined === input.items || (Array.isArray(input.items) && input.items.every((elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && _iu5(elem))) || "object" === typeof input.items && null !== input.items && false === Array.isArray(input.items) && _iu5(input.items)))) && (undefined === input.prefixItems || Array.isArray(input.prefixItems) && input.prefixItems.every((elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && _iu5(elem)))) && (undefined === input.uniqueItems || "boolean" === typeof input.uniqueItems) && (null !== input.additionalItems && (undefined === input.additionalItems || "boolean" === typeof input.additionalItems || "object" === typeof input.additionalItems && null !== input.additionalItems && false === Array.isArray(input.additionalItems) && _iu5(input.additionalItems))) && (undefined === input.minItems || "number" === typeof input.minItems && (Math.floor(input.minItems) === input.minItems && 0 <= input.minItems && input.minItems <= 0x10000000000000000)) && (undefined === input.maxItems || "number" === typeof input.maxItems && (Math.floor(input.maxItems) === input.maxItems && 0 <= input.maxItems && input.maxItems <= 0x10000000000000000)) && (null !== input.additionalProperties && (undefined === input.additionalProperties || "boolean" === typeof input.additionalProperties || "object" === typeof input.additionalProperties && null !== input.additionalProperties && false === Array.isArray(input.additionalProperties) && _iu5(input.additionalProperties))) && (undefined === input.properties || "object" === typeof input.properties && null !== input.properties && false === Array.isArray(input.properties) && _io113(input.properties)) && (undefined === input.required || Array.isArray(input.required) && input.required.every((elem => "string" === typeof elem))) && (undefined === input.maxProperties || "number" === typeof input.maxProperties) && (undefined === input.minProperties || "number" === typeof input.minProperties) && (Array.isArray(input.oneOf) && input.oneOf.every((elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && _iu5(elem)))) && (undefined === input.discriminator || "object" === typeof input.discriminator && null !== input.discriminator && _io127(input.discriminator)) && (Array.isArray(input.anyOf) && input.anyOf.every((elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && _iu5(elem)))) && (Array.isArray(input.allOf) && input.allOf.every((elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && _iu5(elem)))) && "string" === typeof input.$ref;
4540
4722
  const _io115 = input => ("string" === typeof input["const"] || "number" === typeof input["const"] || "boolean" === typeof input["const"]) && (undefined === input.nullable || "boolean" === typeof input.nullable) && (null !== input.examples && (undefined === input.examples || (Array.isArray(input.examples) || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io58(input.examples)))) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && true;
4541
4723
  const _io116 = input => (undefined === input.nullable || "boolean" === typeof input.nullable) && (null === input["default"] || undefined === input["default"] || "boolean" === typeof input["default"]) && (undefined === input["enum"] || Array.isArray(input["enum"]) && input["enum"].every((elem => null === elem || "boolean" === typeof elem))) && "boolean" === input.type && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && true && (null !== input.examples && (undefined === input.examples || (Array.isArray(input.examples) || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io58(input.examples))));
4542
4724
  const _io117 = input => (undefined === input.nullable || "boolean" === typeof input.nullable) && (null === input["default"] || undefined === input["default"] || "number" === typeof input["default"] && (Math.floor(input["default"]) === input["default"] && -0x8000000000000000 <= input["default"] && input["default"] <= 0x8000000000000000)) && (undefined === input["enum"] || Array.isArray(input["enum"]) && input["enum"].every((elem => null === elem || "number" === typeof elem))) && (undefined === input.minimum || "number" === typeof input.minimum && (Math.floor(input.minimum) === input.minimum && -0x8000000000000000 <= input.minimum && input.minimum <= 0x8000000000000000)) && (undefined === input.maximum || "number" === typeof input.maximum && (Math.floor(input.maximum) === input.maximum && -0x8000000000000000 <= input.maximum && input.maximum <= 0x8000000000000000)) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum && (Math.floor(input.exclusiveMinimum) === input.exclusiveMinimum && -0x8000000000000000 <= input.exclusiveMinimum && input.exclusiveMinimum <= 0x8000000000000000) || "boolean" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum && (Math.floor(input.exclusiveMaximum) === input.exclusiveMaximum && -0x8000000000000000 <= input.exclusiveMaximum && input.exclusiveMaximum <= 0x8000000000000000) || "boolean" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && (Math.floor(input.multipleOf) === input.multipleOf && 0 <= input.multipleOf && input.multipleOf <= 0x10000000000000000 && 0 < input.multipleOf)) && "integer" === input.type && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && true && (null !== input.examples && (undefined === input.examples || (Array.isArray(input.examples) || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io58(input.examples))));
@@ -4558,7 +4740,7 @@ function assertHttpLlmApplication(props) {
4558
4740
  return "object" === typeof value && null !== value && false === Array.isArray(value) && _io131(value);
4559
4741
  }));
4560
4742
  const _io131 = input => (undefined === input.parameters || Array.isArray(input.parameters) && input.parameters.every((elem => "object" === typeof elem && null !== elem && _iu6(elem)))) && (undefined === input.servers || Array.isArray(input.servers) && input.servers.every((elem => "object" === typeof elem && null !== elem && _io106(elem)))) && (undefined === input.summary || "string" === typeof input.summary) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.get || "object" === typeof input.get && null !== input.get && false === Array.isArray(input.get) && _io138(input.get)) && (undefined === input.post || "object" === typeof input.post && null !== input.post && false === Array.isArray(input.post) && _io138(input.post)) && (undefined === input.patch || "object" === typeof input.patch && null !== input.patch && false === Array.isArray(input.patch) && _io138(input.patch)) && (undefined === input.put || "object" === typeof input.put && null !== input.put && false === Array.isArray(input.put) && _io138(input.put)) && (undefined === input["delete"] || "object" === typeof input["delete"] && null !== input["delete"] && false === Array.isArray(input["delete"]) && _io138(input["delete"])) && (undefined === input.options || "object" === typeof input.options && null !== input.options && false === Array.isArray(input.options) && _io138(input.options)) && (undefined === input.head || "object" === typeof input.head && null !== input.head && false === Array.isArray(input.head) && _io138(input.head)) && (undefined === input.trace || "object" === typeof input.trace && null !== input.trace && false === Array.isArray(input.trace) && _io138(input.trace));
4561
- const _io132 = input => (undefined === input.name || "string" === typeof input.name) && ("query" === input["in"] || "header" === input["in"] || "cookie" === input["in"] || "path" === input["in"]) && ("object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) && _iu5(input.schema)) && (undefined === input.required || "boolean" === typeof input.required) && (undefined === input.description || "string" === typeof input.description) && true && (undefined === input.examples || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io133(input.examples));
4743
+ const _io132 = input => (undefined === input.name || "string" === typeof input.name) && ("path" === input["in"] || "query" === input["in"] || "header" === input["in"] || "cookie" === input["in"]) && ("object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) && _iu5(input.schema)) && (undefined === input.required || "boolean" === typeof input.required) && (undefined === input.description || "string" === typeof input.description) && true && (undefined === input.examples || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io133(input.examples));
4562
4744
  const _io133 = input => Object.keys(input).every((key => {
4563
4745
  const value = input[key];
4564
4746
  if (undefined === value) return true;
@@ -4588,7 +4770,7 @@ function assertHttpLlmApplication(props) {
4588
4770
  if (undefined === value) return true;
4589
4771
  return "object" === typeof value && null !== value && _iu20(value);
4590
4772
  }));
4591
- const _io146 = input => (undefined === input.name || "string" === typeof input.name) && (undefined === input.required || "boolean" === typeof input.required) && (undefined === input.description || "string" === typeof input.description) && true && (undefined === input.examples || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io133(input.examples)) && ("object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) && _iu5(input.schema));
4773
+ const _io146 = input => (undefined === input.required || "boolean" === typeof input.required) && (undefined === input.description || "string" === typeof input.description) && true && (undefined === input.examples || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io133(input.examples)) && (undefined === input.name || "string" === typeof input.name) && ("object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) && _iu5(input.schema));
4592
4774
  const _io147 = input => "string" === typeof input.$ref && RegExp(/^#\/components\/responses\/(.*)/).test(input.$ref) && (null !== input.examples && (undefined === input.examples || (Array.isArray(input.examples) || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io58(input.examples)))) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && true;
4593
4775
  const _io148 = input => Object.keys(input).every((key => {
4594
4776
  const value = input[key];
@@ -4687,7 +4869,7 @@ function assertHttpLlmApplication(props) {
4687
4869
  }));
4688
4870
  const _io199 = input => (undefined === input.servers || Array.isArray(input.servers) && input.servers.every((elem => "object" === typeof elem && null !== elem && _io167(elem)))) && (undefined === input.summary || "string" === typeof input.summary) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.get || "object" === typeof input.get && null !== input.get && false === Array.isArray(input.get) && _io200(input.get)) && (undefined === input.post || "object" === typeof input.post && null !== input.post && false === Array.isArray(input.post) && _io200(input.post)) && (undefined === input.patch || "object" === typeof input.patch && null !== input.patch && false === Array.isArray(input.patch) && _io200(input.patch)) && (undefined === input.put || "object" === typeof input.put && null !== input.put && false === Array.isArray(input.put) && _io200(input.put)) && (undefined === input["delete"] || "object" === typeof input["delete"] && null !== input["delete"] && false === Array.isArray(input["delete"]) && _io200(input["delete"])) && (undefined === input.options || "object" === typeof input.options && null !== input.options && false === Array.isArray(input.options) && _io200(input.options)) && (undefined === input.head || "object" === typeof input.head && null !== input.head && false === Array.isArray(input.head) && _io200(input.head)) && (undefined === input.trace || "object" === typeof input.trace && null !== input.trace && false === Array.isArray(input.trace) && _io200(input.trace));
4689
4871
  const _io200 = input => (undefined === input.operationId || "string" === typeof input.operationId) && (undefined === input.parameters || Array.isArray(input.parameters) && input.parameters.every((elem => "object" === typeof elem && null !== elem && _io201(elem)))) && (undefined === input.requestBody || "object" === typeof input.requestBody && null !== input.requestBody && false === Array.isArray(input.requestBody) && _io204(input.requestBody)) && (undefined === input.responses || "object" === typeof input.responses && null !== input.responses && false === Array.isArray(input.responses) && _io207(input.responses)) && (undefined === input.servers || Array.isArray(input.servers) && input.servers.every((elem => "object" === typeof elem && null !== elem && _io167(elem)))) && (undefined === input.summary || "string" === typeof input.summary) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.security || Array.isArray(input.security) && input.security.every((elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && _io39(elem)))) && (undefined === input.tags || Array.isArray(input.tags) && input.tags.every((elem => "string" === typeof elem))) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (undefined === input["x-samchon-human"] || "boolean" === typeof input["x-samchon-human"]) && (undefined === input["x-samchon-accessor"] || Array.isArray(input["x-samchon-accessor"]) && input["x-samchon-accessor"].every((elem => "string" === typeof elem))) && (undefined === input["x-samchon-controller"] || "string" === typeof input["x-samchon-controller"]);
4690
- const _io201 = input => (undefined === input.name || "string" === typeof input.name) && ("query" === input["in"] || "header" === input["in"] || "cookie" === input["in"] || "path" === input["in"]) && ("object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) && _iu7(input.schema)) && (undefined === input.required || "boolean" === typeof input.required) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && true && (undefined === input.examples || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io202(input.examples));
4872
+ const _io201 = input => (undefined === input.name || "string" === typeof input.name) && ("path" === input["in"] || "query" === input["in"] || "header" === input["in"] || "cookie" === input["in"]) && ("object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) && _iu7(input.schema)) && (undefined === input.required || "boolean" === typeof input.required) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && true && (undefined === input.examples || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io202(input.examples));
4691
4873
  const _io202 = input => Object.keys(input).every((key => {
4692
4874
  const value = input[key];
4693
4875
  if (undefined === value) return true;
@@ -8320,12 +8502,7 @@ function assertHttpLlmApplication(props) {
8320
8502
  value
8321
8503
  }, _errorFactory);
8322
8504
  }));
8323
- const _ao79 = (input, _path, _exceptionable = true) => (undefined === input.name || "string" === typeof input.name || __typia_transform__assertGuard._assertGuard(_exceptionable, {
8324
- method: "typia.assert",
8325
- path: _path + ".name",
8326
- expected: "(string | undefined)",
8327
- value: input.name
8328
- }, _errorFactory)) && (undefined === input.required || "boolean" === typeof input.required || __typia_transform__assertGuard._assertGuard(_exceptionable, {
8505
+ const _ao79 = (input, _path, _exceptionable = true) => (undefined === input.required || "boolean" === typeof input.required || __typia_transform__assertGuard._assertGuard(_exceptionable, {
8329
8506
  method: "typia.assert",
8330
8507
  path: _path + ".required",
8331
8508
  expected: "(boolean | undefined)",
@@ -8345,6 +8522,11 @@ function assertHttpLlmApplication(props) {
8345
8522
  path: _path + ".examples",
8346
8523
  expected: "(Record<string, IExample | IReference<`#/components/examples/${string}`>> | undefined)",
8347
8524
  value: input.examples
8525
+ }, _errorFactory)) && (undefined === input.name || "string" === typeof input.name || __typia_transform__assertGuard._assertGuard(_exceptionable, {
8526
+ method: "typia.assert",
8527
+ path: _path + ".name",
8528
+ expected: "(string | undefined)",
8529
+ value: input.name
8348
8530
  }, _errorFactory)) && (("object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
8349
8531
  method: "typia.assert",
8350
8532
  path: _path + ".schema",
@@ -8412,7 +8594,7 @@ function assertHttpLlmApplication(props) {
8412
8594
  path: _path + ".name",
8413
8595
  expected: "(string | undefined)",
8414
8596
  value: input.name
8415
- }, _errorFactory)) && ("query" === input["in"] || "header" === input["in"] || "cookie" === input["in"] || "path" === input["in"] || __typia_transform__assertGuard._assertGuard(_exceptionable, {
8597
+ }, _errorFactory)) && ("path" === input["in"] || "query" === input["in"] || "header" === input["in"] || "cookie" === input["in"] || __typia_transform__assertGuard._assertGuard(_exceptionable, {
8416
8598
  method: "typia.assert",
8417
8599
  path: _path + '["in"]',
8418
8600
  expected: '("cookie" | "header" | "path" | "query")',
@@ -9551,16 +9733,6 @@ function assertHttpLlmApplication(props) {
9551
9733
  path: _path + ".maximum",
9552
9734
  expected: "(number | undefined)",
9553
9735
  value: input.maximum
9554
- }, _errorFactory)) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum || "boolean" === typeof input.exclusiveMinimum || __typia_transform__assertGuard._assertGuard(_exceptionable, {
9555
- method: "typia.assert",
9556
- path: _path + ".exclusiveMinimum",
9557
- expected: "(boolean | number | undefined)",
9558
- value: input.exclusiveMinimum
9559
- }, _errorFactory)) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum || "boolean" === typeof input.exclusiveMaximum || __typia_transform__assertGuard._assertGuard(_exceptionable, {
9560
- method: "typia.assert",
9561
- path: _path + ".exclusiveMaximum",
9562
- expected: "(boolean | number | undefined)",
9563
- value: input.exclusiveMaximum
9564
9736
  }, _errorFactory)) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && (0 < input.multipleOf || __typia_transform__assertGuard._assertGuard(_exceptionable, {
9565
9737
  method: "typia.assert",
9566
9738
  path: _path + ".multipleOf",
@@ -9571,6 +9743,16 @@ function assertHttpLlmApplication(props) {
9571
9743
  path: _path + ".multipleOf",
9572
9744
  expected: "((number & ExclusiveMinimum<0>) | undefined)",
9573
9745
  value: input.multipleOf
9746
+ }, _errorFactory)) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum || "boolean" === typeof input.exclusiveMinimum || __typia_transform__assertGuard._assertGuard(_exceptionable, {
9747
+ method: "typia.assert",
9748
+ path: _path + ".exclusiveMinimum",
9749
+ expected: "(boolean | number | undefined)",
9750
+ value: input.exclusiveMinimum
9751
+ }, _errorFactory)) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum || "boolean" === typeof input.exclusiveMaximum || __typia_transform__assertGuard._assertGuard(_exceptionable, {
9752
+ method: "typia.assert",
9753
+ path: _path + ".exclusiveMaximum",
9754
+ expected: "(boolean | number | undefined)",
9755
+ value: input.exclusiveMaximum
9574
9756
  }, _errorFactory)) && (undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 0x10000000000000000 || __typia_transform__assertGuard._assertGuard(_exceptionable, {
9575
9757
  method: "typia.assert",
9576
9758
  path: _path + ".maxLength",
@@ -10928,7 +11110,7 @@ function assertHttpLlmApplication(props) {
10928
11110
  path: _path + ".name",
10929
11111
  expected: "(string | undefined)",
10930
11112
  value: input.name
10931
- }, _errorFactory)) && ("query" === input["in"] || "header" === input["in"] || "cookie" === input["in"] || "path" === input["in"] || __typia_transform__assertGuard._assertGuard(_exceptionable, {
11113
+ }, _errorFactory)) && ("path" === input["in"] || "query" === input["in"] || "header" === input["in"] || "cookie" === input["in"] || __typia_transform__assertGuard._assertGuard(_exceptionable, {
10932
11114
  method: "typia.assert",
10933
11115
  path: _path + '["in"]',
10934
11116
  expected: '("cookie" | "header" | "path" | "query")',
@@ -11368,12 +11550,7 @@ function assertHttpLlmApplication(props) {
11368
11550
  value
11369
11551
  }, _errorFactory);
11370
11552
  }));
11371
- const _ao146 = (input, _path, _exceptionable = true) => (undefined === input.name || "string" === typeof input.name || __typia_transform__assertGuard._assertGuard(_exceptionable, {
11372
- method: "typia.assert",
11373
- path: _path + ".name",
11374
- expected: "(string | undefined)",
11375
- value: input.name
11376
- }, _errorFactory)) && (undefined === input.required || "boolean" === typeof input.required || __typia_transform__assertGuard._assertGuard(_exceptionable, {
11553
+ const _ao146 = (input, _path, _exceptionable = true) => (undefined === input.required || "boolean" === typeof input.required || __typia_transform__assertGuard._assertGuard(_exceptionable, {
11377
11554
  method: "typia.assert",
11378
11555
  path: _path + ".required",
11379
11556
  expected: "(boolean | undefined)",
@@ -11393,6 +11570,11 @@ function assertHttpLlmApplication(props) {
11393
11570
  path: _path + ".examples",
11394
11571
  expected: "(Record<string, IExample | IReference<`#/components/examples/${string}`>>.o1 | undefined)",
11395
11572
  value: input.examples
11573
+ }, _errorFactory)) && (undefined === input.name || "string" === typeof input.name || __typia_transform__assertGuard._assertGuard(_exceptionable, {
11574
+ method: "typia.assert",
11575
+ path: _path + ".name",
11576
+ expected: "(string | undefined)",
11577
+ value: input.name
11396
11578
  }, _errorFactory)) && (("object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
11397
11579
  method: "typia.assert",
11398
11580
  path: _path + ".schema",
@@ -13272,7 +13454,7 @@ function assertHttpLlmApplication(props) {
13272
13454
  path: _path + ".name",
13273
13455
  expected: "(string | undefined)",
13274
13456
  value: input.name
13275
- }, _errorFactory)) && ("query" === input["in"] || "header" === input["in"] || "cookie" === input["in"] || "path" === input["in"] || __typia_transform__assertGuard._assertGuard(_exceptionable, {
13457
+ }, _errorFactory)) && ("path" === input["in"] || "query" === input["in"] || "header" === input["in"] || "cookie" === input["in"] || __typia_transform__assertGuard._assertGuard(_exceptionable, {
13276
13458
  method: "typia.assert",
13277
13459
  path: _path + '["in"]',
13278
13460
  expected: '("cookie" | "header" | "path" | "query")',
@@ -13685,6 +13867,37 @@ function assertHttpLlmApplication(props) {
13685
13867
  });
13686
13868
  }
13687
13869
 
13870
+ async function assertMcpLlmApplication(props) {
13871
+ const client = new Client({
13872
+ name: "get_tool_list",
13873
+ version: "1.0.0"
13874
+ });
13875
+ const transport = (() => {
13876
+ switch (props.type) {
13877
+ case "sse":
13878
+ return new SSEClientTransport(props.url);
13879
+
13880
+ case "stdio":
13881
+ return new StdioClientTransport(props);
13882
+
13883
+ default:
13884
+ throw new Error("Invalid transport type");
13885
+ }
13886
+ })();
13887
+ await client.connect(transport);
13888
+ const toolList = await client.request({
13889
+ method: "tools/list"
13890
+ }, ListToolsResultSchema);
13891
+ return {
13892
+ functions: toolList.tools.map((tool => ({
13893
+ name: tool.name,
13894
+ description: tool.description,
13895
+ parameters: tool.inputSchema
13896
+ }))),
13897
+ transport: props
13898
+ };
13899
+ }
13900
+
13688
13901
  function validateHttpLlmApplication(props) {
13689
13902
  const inspect = (() => {
13690
13903
  const _io0 = input => null !== input.swagger && undefined !== input.swagger && ("2.0" === input.swagger || "string" === typeof input.swagger && RegExp(/^2\.0\.[+-]?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?$/).test(input.swagger)) && (undefined === input.info || "object" === typeof input.info && null !== input.info && _io1(input.info)) && (undefined === input.host || "string" === typeof input.host) && (undefined === input.basePath || "string" === typeof input.basePath) && (undefined === input.consumes || Array.isArray(input.consumes) && input.consumes.every((elem => "string" === typeof elem))) && (undefined === input.produces || Array.isArray(input.produces) && input.produces.every((elem => "string" === typeof elem))) && (undefined === input.definitions || "object" === typeof input.definitions && null !== input.definitions && false === Array.isArray(input.definitions) && _io4(input.definitions)) && (undefined === input.parameters || "object" === typeof input.parameters && null !== input.parameters && false === Array.isArray(input.parameters) && _io16(input.parameters)) && (undefined === input.responses || "object" === typeof input.responses && null !== input.responses && false === Array.isArray(input.responses) && _io29(input.responses)) && (undefined === input.securityDefinitions || "object" === typeof input.securityDefinitions && null !== input.securityDefinitions && false === Array.isArray(input.securityDefinitions) && _io31(input.securityDefinitions)) && (undefined === input.security || Array.isArray(input.security) && input.security.every((elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && _io39(elem)))) && (undefined === input.paths || "object" === typeof input.paths && null !== input.paths && false === Array.isArray(input.paths) && _io40(input.paths)) && (undefined === input.tags || Array.isArray(input.tags) && input.tags.every((elem => "object" === typeof elem && null !== elem && _io47(elem))));
@@ -13826,14 +14039,14 @@ function validateHttpLlmApplication(props) {
13826
14039
  if (undefined === value) return true;
13827
14040
  return "object" === typeof value && null !== value && _iu13(value);
13828
14041
  }));
13829
- const _io79 = input => (undefined === input.name || "string" === typeof input.name) && (undefined === input.required || "boolean" === typeof input.required) && (undefined === input.description || "string" === typeof input.description) && true && (undefined === input.examples || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io75(input.examples)) && ("object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) && _iu3(input.schema));
14042
+ const _io79 = input => (undefined === input.required || "boolean" === typeof input.required) && (undefined === input.description || "string" === typeof input.description) && true && (undefined === input.examples || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io75(input.examples)) && (undefined === input.name || "string" === typeof input.name) && ("object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) && _iu3(input.schema));
13830
14043
  const _io80 = input => "string" === typeof input.$ref && RegExp(/^#\/components\/headers\/(.*)/).test(input.$ref) && (null !== input.examples && (undefined === input.examples || (Array.isArray(input.examples) || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io58(input.examples)))) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && true;
13831
14044
  const _io81 = input => Object.keys(input).every((key => {
13832
14045
  const value = input[key];
13833
14046
  if (undefined === value) return true;
13834
14047
  return "object" === typeof value && null !== value && _io82(value);
13835
14048
  }));
13836
- const _io82 = input => (undefined === input.name || "string" === typeof input.name) && ("query" === input["in"] || "header" === input["in"] || "cookie" === input["in"] || "path" === input["in"]) && ("object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) && _iu3(input.schema)) && (undefined === input.required || "boolean" === typeof input.required) && (undefined === input.description || "string" === typeof input.description) && true && (undefined === input.examples || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io75(input.examples));
14049
+ const _io82 = input => (undefined === input.name || "string" === typeof input.name) && ("path" === input["in"] || "query" === input["in"] || "header" === input["in"] || "cookie" === input["in"]) && ("object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) && _iu3(input.schema)) && (undefined === input.required || "boolean" === typeof input.required) && (undefined === input.description || "string" === typeof input.description) && true && (undefined === input.examples || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io75(input.examples));
13837
14050
  const _io83 = input => Object.keys(input).every((key => {
13838
14051
  const value = input[key];
13839
14052
  if (undefined === value) return true;
@@ -13897,7 +14110,7 @@ function validateHttpLlmApplication(props) {
13897
14110
  if (undefined === value) return true;
13898
14111
  return "object" === typeof value && null !== value && false === Array.isArray(value) && _iu5(value);
13899
14112
  }));
13900
- const _io114 = input => Array.isArray(input.type) && input.type.every((elem => "string" === elem || "number" === elem || "boolean" === elem || "object" === elem || "integer" === elem || "array" === elem || "null" === elem)) && (null === input["default"] || undefined === input["default"] || Array.isArray(input["default"])) && (undefined === input["enum"] || Array.isArray(input["enum"])) && ("string" === typeof input["const"] || "number" === typeof input["const"] || "boolean" === typeof input["const"]) && (undefined === input.nullable || "boolean" === typeof input.nullable) && (null !== input.examples && (undefined === input.examples || (Array.isArray(input.examples) || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io58(input.examples)))) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && true && (undefined === input.minimum || "number" === typeof input.minimum) && (undefined === input.maximum || "number" === typeof input.maximum) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum || "boolean" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum || "boolean" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && 0 < input.multipleOf) && (undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 0x10000000000000000)) && (undefined === input.format || "string" === typeof input.format) && (undefined === input.pattern || "string" === typeof input.pattern) && (undefined === input.contentMediaType || "string" === typeof input.contentMediaType) && (undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 0x10000000000000000)) && (null !== input.items && (undefined === input.items || (Array.isArray(input.items) && input.items.every((elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && _iu5(elem))) || "object" === typeof input.items && null !== input.items && false === Array.isArray(input.items) && _iu5(input.items)))) && (undefined === input.prefixItems || Array.isArray(input.prefixItems) && input.prefixItems.every((elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && _iu5(elem)))) && (undefined === input.uniqueItems || "boolean" === typeof input.uniqueItems) && (null !== input.additionalItems && (undefined === input.additionalItems || "boolean" === typeof input.additionalItems || "object" === typeof input.additionalItems && null !== input.additionalItems && false === Array.isArray(input.additionalItems) && _iu5(input.additionalItems))) && (undefined === input.minItems || "number" === typeof input.minItems && (Math.floor(input.minItems) === input.minItems && 0 <= input.minItems && input.minItems <= 0x10000000000000000)) && (undefined === input.maxItems || "number" === typeof input.maxItems && (Math.floor(input.maxItems) === input.maxItems && 0 <= input.maxItems && input.maxItems <= 0x10000000000000000)) && (null !== input.additionalProperties && (undefined === input.additionalProperties || "boolean" === typeof input.additionalProperties || "object" === typeof input.additionalProperties && null !== input.additionalProperties && false === Array.isArray(input.additionalProperties) && _iu5(input.additionalProperties))) && (undefined === input.properties || "object" === typeof input.properties && null !== input.properties && false === Array.isArray(input.properties) && _io113(input.properties)) && (undefined === input.required || Array.isArray(input.required) && input.required.every((elem => "string" === typeof elem))) && (undefined === input.maxProperties || "number" === typeof input.maxProperties) && (undefined === input.minProperties || "number" === typeof input.minProperties) && (Array.isArray(input.oneOf) && input.oneOf.every((elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && _iu5(elem)))) && (undefined === input.discriminator || "object" === typeof input.discriminator && null !== input.discriminator && _io127(input.discriminator)) && (Array.isArray(input.anyOf) && input.anyOf.every((elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && _iu5(elem)))) && (Array.isArray(input.allOf) && input.allOf.every((elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && _iu5(elem)))) && "string" === typeof input.$ref;
14113
+ const _io114 = input => Array.isArray(input.type) && input.type.every((elem => "string" === elem || "number" === elem || "boolean" === elem || "object" === elem || "integer" === elem || "array" === elem || "null" === elem)) && (null === input["default"] || undefined === input["default"] || Array.isArray(input["default"])) && (undefined === input["enum"] || Array.isArray(input["enum"])) && ("string" === typeof input["const"] || "number" === typeof input["const"] || "boolean" === typeof input["const"]) && (undefined === input.nullable || "boolean" === typeof input.nullable) && (null !== input.examples && (undefined === input.examples || (Array.isArray(input.examples) || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io58(input.examples)))) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && true && (undefined === input.minimum || "number" === typeof input.minimum) && (undefined === input.maximum || "number" === typeof input.maximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && 0 < input.multipleOf) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum || "boolean" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum || "boolean" === typeof input.exclusiveMaximum) && (undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 0x10000000000000000)) && (undefined === input.format || "string" === typeof input.format) && (undefined === input.pattern || "string" === typeof input.pattern) && (undefined === input.contentMediaType || "string" === typeof input.contentMediaType) && (undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 0x10000000000000000)) && (null !== input.items && (undefined === input.items || (Array.isArray(input.items) && input.items.every((elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && _iu5(elem))) || "object" === typeof input.items && null !== input.items && false === Array.isArray(input.items) && _iu5(input.items)))) && (undefined === input.prefixItems || Array.isArray(input.prefixItems) && input.prefixItems.every((elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && _iu5(elem)))) && (undefined === input.uniqueItems || "boolean" === typeof input.uniqueItems) && (null !== input.additionalItems && (undefined === input.additionalItems || "boolean" === typeof input.additionalItems || "object" === typeof input.additionalItems && null !== input.additionalItems && false === Array.isArray(input.additionalItems) && _iu5(input.additionalItems))) && (undefined === input.minItems || "number" === typeof input.minItems && (Math.floor(input.minItems) === input.minItems && 0 <= input.minItems && input.minItems <= 0x10000000000000000)) && (undefined === input.maxItems || "number" === typeof input.maxItems && (Math.floor(input.maxItems) === input.maxItems && 0 <= input.maxItems && input.maxItems <= 0x10000000000000000)) && (null !== input.additionalProperties && (undefined === input.additionalProperties || "boolean" === typeof input.additionalProperties || "object" === typeof input.additionalProperties && null !== input.additionalProperties && false === Array.isArray(input.additionalProperties) && _iu5(input.additionalProperties))) && (undefined === input.properties || "object" === typeof input.properties && null !== input.properties && false === Array.isArray(input.properties) && _io113(input.properties)) && (undefined === input.required || Array.isArray(input.required) && input.required.every((elem => "string" === typeof elem))) && (undefined === input.maxProperties || "number" === typeof input.maxProperties) && (undefined === input.minProperties || "number" === typeof input.minProperties) && (Array.isArray(input.oneOf) && input.oneOf.every((elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && _iu5(elem)))) && (undefined === input.discriminator || "object" === typeof input.discriminator && null !== input.discriminator && _io127(input.discriminator)) && (Array.isArray(input.anyOf) && input.anyOf.every((elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && _iu5(elem)))) && (Array.isArray(input.allOf) && input.allOf.every((elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && _iu5(elem)))) && "string" === typeof input.$ref;
13901
14114
  const _io115 = input => ("string" === typeof input["const"] || "number" === typeof input["const"] || "boolean" === typeof input["const"]) && (undefined === input.nullable || "boolean" === typeof input.nullable) && (null !== input.examples && (undefined === input.examples || (Array.isArray(input.examples) || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io58(input.examples)))) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && true;
13902
14115
  const _io116 = input => (undefined === input.nullable || "boolean" === typeof input.nullable) && (null === input["default"] || undefined === input["default"] || "boolean" === typeof input["default"]) && (undefined === input["enum"] || Array.isArray(input["enum"]) && input["enum"].every((elem => null === elem || "boolean" === typeof elem))) && "boolean" === input.type && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && true && (null !== input.examples && (undefined === input.examples || (Array.isArray(input.examples) || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io58(input.examples))));
13903
14116
  const _io117 = input => (undefined === input.nullable || "boolean" === typeof input.nullable) && (null === input["default"] || undefined === input["default"] || "number" === typeof input["default"] && (Math.floor(input["default"]) === input["default"] && -0x8000000000000000 <= input["default"] && input["default"] <= 0x8000000000000000)) && (undefined === input["enum"] || Array.isArray(input["enum"]) && input["enum"].every((elem => null === elem || "number" === typeof elem))) && (undefined === input.minimum || "number" === typeof input.minimum && (Math.floor(input.minimum) === input.minimum && -0x8000000000000000 <= input.minimum && input.minimum <= 0x8000000000000000)) && (undefined === input.maximum || "number" === typeof input.maximum && (Math.floor(input.maximum) === input.maximum && -0x8000000000000000 <= input.maximum && input.maximum <= 0x8000000000000000)) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum && (Math.floor(input.exclusiveMinimum) === input.exclusiveMinimum && -0x8000000000000000 <= input.exclusiveMinimum && input.exclusiveMinimum <= 0x8000000000000000) || "boolean" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum && (Math.floor(input.exclusiveMaximum) === input.exclusiveMaximum && -0x8000000000000000 <= input.exclusiveMaximum && input.exclusiveMaximum <= 0x8000000000000000) || "boolean" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && (Math.floor(input.multipleOf) === input.multipleOf && 0 <= input.multipleOf && input.multipleOf <= 0x10000000000000000 && 0 < input.multipleOf)) && "integer" === input.type && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && true && (null !== input.examples && (undefined === input.examples || (Array.isArray(input.examples) || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io58(input.examples))));
@@ -13919,7 +14132,7 @@ function validateHttpLlmApplication(props) {
13919
14132
  return "object" === typeof value && null !== value && false === Array.isArray(value) && _io131(value);
13920
14133
  }));
13921
14134
  const _io131 = input => (undefined === input.parameters || Array.isArray(input.parameters) && input.parameters.every((elem => "object" === typeof elem && null !== elem && _iu6(elem)))) && (undefined === input.servers || Array.isArray(input.servers) && input.servers.every((elem => "object" === typeof elem && null !== elem && _io106(elem)))) && (undefined === input.summary || "string" === typeof input.summary) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.get || "object" === typeof input.get && null !== input.get && false === Array.isArray(input.get) && _io138(input.get)) && (undefined === input.post || "object" === typeof input.post && null !== input.post && false === Array.isArray(input.post) && _io138(input.post)) && (undefined === input.patch || "object" === typeof input.patch && null !== input.patch && false === Array.isArray(input.patch) && _io138(input.patch)) && (undefined === input.put || "object" === typeof input.put && null !== input.put && false === Array.isArray(input.put) && _io138(input.put)) && (undefined === input["delete"] || "object" === typeof input["delete"] && null !== input["delete"] && false === Array.isArray(input["delete"]) && _io138(input["delete"])) && (undefined === input.options || "object" === typeof input.options && null !== input.options && false === Array.isArray(input.options) && _io138(input.options)) && (undefined === input.head || "object" === typeof input.head && null !== input.head && false === Array.isArray(input.head) && _io138(input.head)) && (undefined === input.trace || "object" === typeof input.trace && null !== input.trace && false === Array.isArray(input.trace) && _io138(input.trace));
13922
- const _io132 = input => (undefined === input.name || "string" === typeof input.name) && ("query" === input["in"] || "header" === input["in"] || "cookie" === input["in"] || "path" === input["in"]) && ("object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) && _iu5(input.schema)) && (undefined === input.required || "boolean" === typeof input.required) && (undefined === input.description || "string" === typeof input.description) && true && (undefined === input.examples || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io133(input.examples));
14135
+ const _io132 = input => (undefined === input.name || "string" === typeof input.name) && ("path" === input["in"] || "query" === input["in"] || "header" === input["in"] || "cookie" === input["in"]) && ("object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) && _iu5(input.schema)) && (undefined === input.required || "boolean" === typeof input.required) && (undefined === input.description || "string" === typeof input.description) && true && (undefined === input.examples || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io133(input.examples));
13923
14136
  const _io133 = input => Object.keys(input).every((key => {
13924
14137
  const value = input[key];
13925
14138
  if (undefined === value) return true;
@@ -13949,7 +14162,7 @@ function validateHttpLlmApplication(props) {
13949
14162
  if (undefined === value) return true;
13950
14163
  return "object" === typeof value && null !== value && _iu20(value);
13951
14164
  }));
13952
- const _io146 = input => (undefined === input.name || "string" === typeof input.name) && (undefined === input.required || "boolean" === typeof input.required) && (undefined === input.description || "string" === typeof input.description) && true && (undefined === input.examples || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io133(input.examples)) && ("object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) && _iu5(input.schema));
14165
+ const _io146 = input => (undefined === input.required || "boolean" === typeof input.required) && (undefined === input.description || "string" === typeof input.description) && true && (undefined === input.examples || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io133(input.examples)) && (undefined === input.name || "string" === typeof input.name) && ("object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) && _iu5(input.schema));
13953
14166
  const _io147 = input => "string" === typeof input.$ref && RegExp(/^#\/components\/responses\/(.*)/).test(input.$ref) && (null !== input.examples && (undefined === input.examples || (Array.isArray(input.examples) || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io58(input.examples)))) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && true;
13954
14167
  const _io148 = input => Object.keys(input).every((key => {
13955
14168
  const value = input[key];
@@ -14048,7 +14261,7 @@ function validateHttpLlmApplication(props) {
14048
14261
  }));
14049
14262
  const _io199 = input => (undefined === input.servers || Array.isArray(input.servers) && input.servers.every((elem => "object" === typeof elem && null !== elem && _io167(elem)))) && (undefined === input.summary || "string" === typeof input.summary) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.get || "object" === typeof input.get && null !== input.get && false === Array.isArray(input.get) && _io200(input.get)) && (undefined === input.post || "object" === typeof input.post && null !== input.post && false === Array.isArray(input.post) && _io200(input.post)) && (undefined === input.patch || "object" === typeof input.patch && null !== input.patch && false === Array.isArray(input.patch) && _io200(input.patch)) && (undefined === input.put || "object" === typeof input.put && null !== input.put && false === Array.isArray(input.put) && _io200(input.put)) && (undefined === input["delete"] || "object" === typeof input["delete"] && null !== input["delete"] && false === Array.isArray(input["delete"]) && _io200(input["delete"])) && (undefined === input.options || "object" === typeof input.options && null !== input.options && false === Array.isArray(input.options) && _io200(input.options)) && (undefined === input.head || "object" === typeof input.head && null !== input.head && false === Array.isArray(input.head) && _io200(input.head)) && (undefined === input.trace || "object" === typeof input.trace && null !== input.trace && false === Array.isArray(input.trace) && _io200(input.trace));
14050
14263
  const _io200 = input => (undefined === input.operationId || "string" === typeof input.operationId) && (undefined === input.parameters || Array.isArray(input.parameters) && input.parameters.every((elem => "object" === typeof elem && null !== elem && _io201(elem)))) && (undefined === input.requestBody || "object" === typeof input.requestBody && null !== input.requestBody && false === Array.isArray(input.requestBody) && _io204(input.requestBody)) && (undefined === input.responses || "object" === typeof input.responses && null !== input.responses && false === Array.isArray(input.responses) && _io207(input.responses)) && (undefined === input.servers || Array.isArray(input.servers) && input.servers.every((elem => "object" === typeof elem && null !== elem && _io167(elem)))) && (undefined === input.summary || "string" === typeof input.summary) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.security || Array.isArray(input.security) && input.security.every((elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && _io39(elem)))) && (undefined === input.tags || Array.isArray(input.tags) && input.tags.every((elem => "string" === typeof elem))) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (undefined === input["x-samchon-human"] || "boolean" === typeof input["x-samchon-human"]) && (undefined === input["x-samchon-accessor"] || Array.isArray(input["x-samchon-accessor"]) && input["x-samchon-accessor"].every((elem => "string" === typeof elem))) && (undefined === input["x-samchon-controller"] || "string" === typeof input["x-samchon-controller"]);
14051
- const _io201 = input => (undefined === input.name || "string" === typeof input.name) && ("query" === input["in"] || "header" === input["in"] || "cookie" === input["in"] || "path" === input["in"]) && ("object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) && _iu7(input.schema)) && (undefined === input.required || "boolean" === typeof input.required) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && true && (undefined === input.examples || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io202(input.examples));
14264
+ const _io201 = input => (undefined === input.name || "string" === typeof input.name) && ("path" === input["in"] || "query" === input["in"] || "header" === input["in"] || "cookie" === input["in"]) && ("object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) && _iu7(input.schema)) && (undefined === input.required || "boolean" === typeof input.required) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && true && (undefined === input.examples || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io202(input.examples));
14052
14265
  const _io202 = input => Object.keys(input).every((key => {
14053
14266
  const value = input[key];
14054
14267
  if (undefined === value) return true;
@@ -17005,11 +17218,7 @@ function validateHttpLlmApplication(props) {
17005
17218
  value
17006
17219
  });
17007
17220
  })).every((flag => flag)) ].every((flag => flag));
17008
- const _vo79 = (input, _path, _exceptionable = true) => [ undefined === input.name || "string" === typeof input.name || _report(_exceptionable, {
17009
- path: _path + ".name",
17010
- expected: "(string | undefined)",
17011
- value: input.name
17012
- }), undefined === input.required || "boolean" === typeof input.required || _report(_exceptionable, {
17221
+ const _vo79 = (input, _path, _exceptionable = true) => [ undefined === input.required || "boolean" === typeof input.required || _report(_exceptionable, {
17013
17222
  path: _path + ".required",
17014
17223
  expected: "(boolean | undefined)",
17015
17224
  value: input.required
@@ -17025,6 +17234,10 @@ function validateHttpLlmApplication(props) {
17025
17234
  path: _path + ".examples",
17026
17235
  expected: "(Record<string, IExample | IReference<`#/components/examples/${string}`>> | undefined)",
17027
17236
  value: input.examples
17237
+ }), undefined === input.name || "string" === typeof input.name || _report(_exceptionable, {
17238
+ path: _path + ".name",
17239
+ expected: "(string | undefined)",
17240
+ value: input.name
17028
17241
  }), ("object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) || _report(_exceptionable, {
17029
17242
  path: _path + ".schema",
17030
17243
  expected: "(OpenApiV3.IJsonSchema.IAllOf | OpenApiV3.IJsonSchema.IAnyOf | OpenApiV3.IJsonSchema.IArray | OpenApiV3.IJsonSchema.IBoolean | OpenApiV3.IJsonSchema.IInteger | OpenApiV3.IJsonSchema.INullOnly | OpenApiV3.IJsonSchema.INumber | OpenApiV3.IJsonSchema.IObject | OpenApiV3.IJsonSchema.IOneOf | OpenApiV3.IJsonSchema.IReference<string> | OpenApiV3.IJsonSchema.IString | OpenApiV3.IJsonSchema.IUnknown)",
@@ -17080,7 +17293,7 @@ function validateHttpLlmApplication(props) {
17080
17293
  path: _path + ".name",
17081
17294
  expected: "(string | undefined)",
17082
17295
  value: input.name
17083
- }), "query" === input["in"] || "header" === input["in"] || "cookie" === input["in"] || "path" === input["in"] || _report(_exceptionable, {
17296
+ }), "path" === input["in"] || "query" === input["in"] || "header" === input["in"] || "cookie" === input["in"] || _report(_exceptionable, {
17084
17297
  path: _path + '["in"]',
17085
17298
  expected: '("cookie" | "header" | "path" | "query")',
17086
17299
  value: input["in"]
@@ -18004,14 +18217,6 @@ function validateHttpLlmApplication(props) {
18004
18217
  path: _path + ".maximum",
18005
18218
  expected: "(number | undefined)",
18006
18219
  value: input.maximum
18007
- }), undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum || "boolean" === typeof input.exclusiveMinimum || _report(_exceptionable, {
18008
- path: _path + ".exclusiveMinimum",
18009
- expected: "(boolean | number | undefined)",
18010
- value: input.exclusiveMinimum
18011
- }), undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum || "boolean" === typeof input.exclusiveMaximum || _report(_exceptionable, {
18012
- path: _path + ".exclusiveMaximum",
18013
- expected: "(boolean | number | undefined)",
18014
- value: input.exclusiveMaximum
18015
18220
  }), undefined === input.multipleOf || "number" === typeof input.multipleOf && (0 < input.multipleOf || _report(_exceptionable, {
18016
18221
  path: _path + ".multipleOf",
18017
18222
  expected: "number & ExclusiveMinimum<0>",
@@ -18020,6 +18225,14 @@ function validateHttpLlmApplication(props) {
18020
18225
  path: _path + ".multipleOf",
18021
18226
  expected: "((number & ExclusiveMinimum<0>) | undefined)",
18022
18227
  value: input.multipleOf
18228
+ }), undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum || "boolean" === typeof input.exclusiveMinimum || _report(_exceptionable, {
18229
+ path: _path + ".exclusiveMinimum",
18230
+ expected: "(boolean | number | undefined)",
18231
+ value: input.exclusiveMinimum
18232
+ }), undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum || "boolean" === typeof input.exclusiveMaximum || _report(_exceptionable, {
18233
+ path: _path + ".exclusiveMaximum",
18234
+ expected: "(boolean | number | undefined)",
18235
+ value: input.exclusiveMaximum
18023
18236
  }), undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 0x10000000000000000 || _report(_exceptionable, {
18024
18237
  path: _path + ".maxLength",
18025
18238
  expected: 'number & Type<"uint64">',
@@ -19110,7 +19323,7 @@ function validateHttpLlmApplication(props) {
19110
19323
  path: _path + ".name",
19111
19324
  expected: "(string | undefined)",
19112
19325
  value: input.name
19113
- }), "query" === input["in"] || "header" === input["in"] || "cookie" === input["in"] || "path" === input["in"] || _report(_exceptionable, {
19326
+ }), "path" === input["in"] || "query" === input["in"] || "header" === input["in"] || "cookie" === input["in"] || _report(_exceptionable, {
19114
19327
  path: _path + '["in"]',
19115
19328
  expected: '("cookie" | "header" | "path" | "query")',
19116
19329
  value: input["in"]
@@ -19468,11 +19681,7 @@ function validateHttpLlmApplication(props) {
19468
19681
  value
19469
19682
  });
19470
19683
  })).every((flag => flag)) ].every((flag => flag));
19471
- const _vo146 = (input, _path, _exceptionable = true) => [ undefined === input.name || "string" === typeof input.name || _report(_exceptionable, {
19472
- path: _path + ".name",
19473
- expected: "(string | undefined)",
19474
- value: input.name
19475
- }), undefined === input.required || "boolean" === typeof input.required || _report(_exceptionable, {
19684
+ const _vo146 = (input, _path, _exceptionable = true) => [ undefined === input.required || "boolean" === typeof input.required || _report(_exceptionable, {
19476
19685
  path: _path + ".required",
19477
19686
  expected: "(boolean | undefined)",
19478
19687
  value: input.required
@@ -19488,6 +19697,10 @@ function validateHttpLlmApplication(props) {
19488
19697
  path: _path + ".examples",
19489
19698
  expected: "(Record<string, IExample | IReference<`#/components/examples/${string}`>>.o1 | undefined)",
19490
19699
  value: input.examples
19700
+ }), undefined === input.name || "string" === typeof input.name || _report(_exceptionable, {
19701
+ path: _path + ".name",
19702
+ expected: "(string | undefined)",
19703
+ value: input.name
19491
19704
  }), ("object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) || _report(_exceptionable, {
19492
19705
  path: _path + ".schema",
19493
19706
  expected: "(OpenApiV3_1.IJsonSchema.IAllOf | OpenApiV3_1.IJsonSchema.IAnyOf | OpenApiV3_1.IJsonSchema.IArray | OpenApiV3_1.IJsonSchema.IBoolean | OpenApiV3_1.IJsonSchema.IConstant | OpenApiV3_1.IJsonSchema.IInteger | OpenApiV3_1.IJsonSchema.IMixed | OpenApiV3_1.IJsonSchema.INull | OpenApiV3_1.IJsonSchema.INumber | OpenApiV3_1.IJsonSchema.IObject | OpenApiV3_1.IJsonSchema.IOneOf | OpenApiV3_1.IJsonSchema.IRecursiveReference | OpenApiV3_1.IJsonSchema.IReference<string> | OpenApiV3_1.IJsonSchema.IString | OpenApiV3_1.IJsonSchema.IUnknown)",
@@ -21011,7 +21224,7 @@ function validateHttpLlmApplication(props) {
21011
21224
  path: _path + ".name",
21012
21225
  expected: "(string | undefined)",
21013
21226
  value: input.name
21014
- }), "query" === input["in"] || "header" === input["in"] || "cookie" === input["in"] || "path" === input["in"] || _report(_exceptionable, {
21227
+ }), "path" === input["in"] || "query" === input["in"] || "header" === input["in"] || "cookie" === input["in"] || _report(_exceptionable, {
21015
21228
  path: _path + '["in"]',
21016
21229
  expected: '("cookie" | "header" | "path" | "query")',
21017
21230
  value: input["in"]
@@ -21418,7 +21631,7 @@ class MicroAgentica {
21418
21631
  });
21419
21632
  this.dispatch(createTextEvent({
21420
21633
  role: "user",
21421
- stream: StreamUtil.to(content),
21634
+ stream: toAsyncGenerator(content),
21422
21635
  done: () => true,
21423
21636
  get: () => content,
21424
21637
  join: async () => Promise.resolve(content)
@@ -21495,7 +21708,7 @@ class MicroAgentica {
21495
21708
  await dispatch({
21496
21709
  type: "response",
21497
21710
  source,
21498
- stream: streamForStream,
21711
+ stream: streamDefaultReaderToAsyncGenerator(streamForStream.getReader()),
21499
21712
  body: event.body,
21500
21713
  options: event.options,
21501
21714
  join: async () => {
@@ -21538,8 +21751,10 @@ var index = Object.freeze({
21538
21751
  AsyncQueue,
21539
21752
  ChatGptCompletionMessageUtil,
21540
21753
  MPSC,
21541
- StreamUtil
21754
+ StreamUtil,
21755
+ streamDefaultReaderToAsyncGenerator,
21756
+ toAsyncGenerator
21542
21757
  });
21543
21758
 
21544
- export { Agentica, AgenticaTokenUsage, MicroAgentica, assertHttpLlmApplication, index$2 as factory, index$1 as orchestrate, index as utils, validateHttpLlmApplication };
21759
+ export { Agentica, AgenticaTokenUsage, MicroAgentica, assertHttpLlmApplication, assertMcpLlmApplication, index$2 as factory, index$1 as orchestrate, index as utils, validateHttpLlmApplication };
21545
21760
  //# sourceMappingURL=index.mjs.map