@agentica/core 0.16.7 → 0.16.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/Agentica.js +2 -2
- package/lib/Agentica.js.map +1 -1
- package/lib/MicroAgentica.js +2 -2
- package/lib/MicroAgentica.js.map +1 -1
- package/lib/context/AgenticaOperation.d.ts +4 -2
- package/lib/context/internal/AgenticaOperationComposer.d.ts +0 -9
- package/lib/context/internal/AgenticaOperationComposer.js +105 -35
- package/lib/context/internal/AgenticaOperationComposer.js.map +1 -1
- package/lib/context/internal/AgenticaOperationComposer.spec.d.ts +1 -0
- package/lib/context/internal/AgenticaOperationComposer.spec.js +266 -0
- package/lib/context/internal/AgenticaOperationComposer.spec.js.map +1 -0
- package/lib/functional/assertHttpLlmApplication.js +31 -31
- package/lib/functional/assertMcpLlmApplication.d.ts +15 -0
- package/lib/functional/assertMcpLlmApplication.js +59 -0
- package/lib/functional/assertMcpLlmApplication.js.map +1 -0
- package/lib/functional/validateHttpLlmApplication.js +27 -27
- package/lib/index.d.ts +1 -0
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +416 -215
- package/lib/index.mjs.map +1 -1
- package/lib/json/IAgenticaOperationJson.d.ts +1 -1
- package/lib/orchestrate/call.js +206 -96
- package/lib/orchestrate/call.js.map +1 -1
- package/lib/orchestrate/cancel.js +0 -1
- package/lib/orchestrate/cancel.js.map +1 -1
- package/lib/orchestrate/initialize.js +63 -62
- package/lib/orchestrate/initialize.js.map +1 -1
- package/lib/orchestrate/select.js +4 -3
- package/lib/orchestrate/select.js.map +1 -1
- package/lib/structures/IAgenticaController.d.ts +9 -2
- package/lib/structures/mcp/IMcpLlmApplication.d.ts +15 -0
- package/lib/structures/mcp/IMcpLlmApplication.js +3 -0
- package/lib/structures/mcp/IMcpLlmApplication.js.map +1 -0
- package/lib/structures/mcp/IMcpLlmFunction.d.ts +17 -0
- package/lib/structures/mcp/IMcpLlmFunction.js +3 -0
- package/lib/structures/mcp/IMcpLlmFunction.js.map +1 -0
- package/lib/structures/mcp/IMcpLlmTransportProps.d.ts +11 -0
- package/lib/structures/mcp/IMcpLlmTransportProps.js +3 -0
- package/lib/structures/mcp/IMcpLlmTransportProps.js.map +1 -0
- package/lib/structures/mcp/index.d.ts +3 -0
- package/lib/structures/mcp/index.js +20 -0
- package/lib/structures/mcp/index.js.map +1 -0
- package/package.json +11 -6
- package/src/Agentica.ts +2 -2
- package/src/MicroAgentica.ts +2 -2
- package/src/context/AgenticaOperation.ts +9 -2
- package/src/context/internal/AgenticaOperationComposer.spec.ts +314 -0
- package/src/context/internal/AgenticaOperationComposer.ts +119 -49
- package/src/functional/assertMcpLlmApplication.ts +48 -0
- package/src/index.ts +6 -2
- package/src/json/IAgenticaOperationJson.ts +1 -1
- package/src/orchestrate/call.ts +239 -137
- package/src/orchestrate/cancel.ts +0 -1
- package/src/orchestrate/initialize.ts +2 -1
- package/src/orchestrate/select.ts +3 -2
- package/src/structures/IAgenticaController.ts +12 -2
- package/src/structures/mcp/IMcpLlmApplication.ts +17 -0
- package/src/structures/mcp/IMcpLlmFunction.ts +19 -0
- package/src/structures/mcp/IMcpLlmTransportProps.ts +13 -0
- package/src/structures/mcp/index.ts +3 -0
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((
|
|
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
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
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();
|
|
@@ -1180,7 +1258,7 @@ async function call(ctx, operations) {
|
|
|
1180
1258
|
function: {
|
|
1181
1259
|
name: s.name,
|
|
1182
1260
|
description: s.function.description,
|
|
1183
|
-
parameters: s.function.separated !== undefined ? s.function.separated.llm ?? {
|
|
1261
|
+
parameters: "separated" in s.function && s.function.separated !== undefined ? s.function.separated.llm ?? {
|
|
1184
1262
|
type: "object",
|
|
1185
1263
|
properties: {},
|
|
1186
1264
|
required: [],
|
|
@@ -1239,7 +1317,7 @@ async function call(ctx, operations) {
|
|
|
1239
1317
|
}));
|
|
1240
1318
|
}
|
|
1241
1319
|
}
|
|
1242
|
-
if (choice.message.role === "assistant" && choice.message.content
|
|
1320
|
+
if (choice.message.role === "assistant" && choice.message.content != null && choice.message.content.length !== 0) {
|
|
1243
1321
|
closures.push((async () => {
|
|
1244
1322
|
const value = createTextHistory({
|
|
1245
1323
|
role: "assistant",
|
|
@@ -1260,85 +1338,148 @@ async function call(ctx, operations) {
|
|
|
1260
1338
|
}
|
|
1261
1339
|
|
|
1262
1340
|
async function propagate(ctx, call, retry) {
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
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({
|
|
1341
|
+
switch (call.operation.protocol) {
|
|
1342
|
+
case "http":
|
|
1343
|
+
{
|
|
1344
|
+
return propagateHttp({
|
|
1345
|
+
ctx,
|
|
1282
1346
|
operation: call.operation,
|
|
1283
|
-
|
|
1284
|
-
|
|
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
|
-
}
|
|
1347
|
+
call,
|
|
1348
|
+
retry
|
|
1301
1349
|
});
|
|
1302
1350
|
}
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
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,
|
|
1351
|
+
|
|
1352
|
+
case "class":
|
|
1353
|
+
{
|
|
1354
|
+
return propagateClass({
|
|
1355
|
+
ctx,
|
|
1313
1356
|
operation: call.operation,
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
name: "TypeGuardError",
|
|
1317
|
-
message: "Invalid arguments.",
|
|
1318
|
-
errors: check.errors
|
|
1319
|
-
}
|
|
1357
|
+
call,
|
|
1358
|
+
retry
|
|
1320
1359
|
});
|
|
1321
1360
|
}
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1361
|
+
|
|
1362
|
+
case "mcp":
|
|
1363
|
+
{
|
|
1364
|
+
return propagateMcp({
|
|
1365
|
+
ctx,
|
|
1326
1366
|
operation: call.operation,
|
|
1327
|
-
|
|
1328
|
-
|
|
1367
|
+
call,
|
|
1368
|
+
retry
|
|
1329
1369
|
});
|
|
1330
|
-
}
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1370
|
+
}
|
|
1371
|
+
|
|
1372
|
+
default:
|
|
1373
|
+
{
|
|
1374
|
+
call.operation;
|
|
1375
|
+
throw new Error("Unsupported protocol");
|
|
1376
|
+
}
|
|
1377
|
+
}
|
|
1378
|
+
}
|
|
1379
|
+
|
|
1380
|
+
async function propagateHttp(props) {
|
|
1381
|
+
const check = props.operation.function.validate(props.call.arguments);
|
|
1382
|
+
if (check.success === false) {
|
|
1383
|
+
props.ctx.dispatch(createValidateEvent({
|
|
1384
|
+
id: props.call.id,
|
|
1385
|
+
operation: props.operation,
|
|
1386
|
+
result: check
|
|
1387
|
+
})).catch((() => {}));
|
|
1388
|
+
if (props.retry++ < (props.ctx.config?.retry ?? AgenticaConstant.RETRY)) {
|
|
1389
|
+
const trial = await correct(props.ctx, props.call, props.retry, check.errors);
|
|
1390
|
+
if (trial !== null) {
|
|
1391
|
+
return trial;
|
|
1392
|
+
}
|
|
1393
|
+
}
|
|
1394
|
+
}
|
|
1395
|
+
try {
|
|
1396
|
+
const response = await executeHttpOperation(props.operation, props.call.arguments);
|
|
1397
|
+
const success = ((response.status === 400 || response.status === 404 || response.status === 422) && props.retry++ < (props.ctx.config?.retry ?? AgenticaConstant.RETRY) && typeof response.body) === false;
|
|
1398
|
+
return (success === false ? await correct(props.ctx, props.call, props.retry, response.body) : null) ?? createExecuteHistory({
|
|
1399
|
+
operation: props.call.operation,
|
|
1400
|
+
id: props.call.id,
|
|
1401
|
+
arguments: props.call.arguments,
|
|
1402
|
+
value: response
|
|
1403
|
+
});
|
|
1404
|
+
} catch (error) {
|
|
1405
|
+
return createExecuteHistory({
|
|
1406
|
+
operation: props.call.operation,
|
|
1407
|
+
id: props.call.id,
|
|
1408
|
+
arguments: props.call.arguments,
|
|
1409
|
+
value: {
|
|
1410
|
+
status: 500,
|
|
1411
|
+
headers: {},
|
|
1412
|
+
body: error instanceof Error ? {
|
|
1336
1413
|
...error,
|
|
1337
1414
|
name: error.name,
|
|
1338
1415
|
message: error.message
|
|
1339
1416
|
} : error
|
|
1340
|
-
}
|
|
1341
|
-
}
|
|
1417
|
+
}
|
|
1418
|
+
});
|
|
1419
|
+
}
|
|
1420
|
+
}
|
|
1421
|
+
|
|
1422
|
+
async function propagateClass(props) {
|
|
1423
|
+
const check = props.operation.function.validate(props.call.arguments);
|
|
1424
|
+
if (check.success === false) {
|
|
1425
|
+
props.ctx.dispatch(createValidateEvent({
|
|
1426
|
+
id: props.call.id,
|
|
1427
|
+
operation: props.call.operation,
|
|
1428
|
+
result: check
|
|
1429
|
+
})).catch((() => {}));
|
|
1430
|
+
return (props.retry++ < (props.ctx.config?.retry ?? AgenticaConstant.RETRY) ? await correct(props.ctx, props.call, props.retry, check.errors) : null) ?? createExecuteHistory({
|
|
1431
|
+
id: props.call.id,
|
|
1432
|
+
operation: props.call.operation,
|
|
1433
|
+
arguments: props.call.arguments,
|
|
1434
|
+
value: {
|
|
1435
|
+
name: "TypeGuardError",
|
|
1436
|
+
message: "Invalid arguments.",
|
|
1437
|
+
errors: check.errors
|
|
1438
|
+
}
|
|
1439
|
+
});
|
|
1440
|
+
}
|
|
1441
|
+
try {
|
|
1442
|
+
const value = await executeClassOperation(props.operation, props.call.arguments);
|
|
1443
|
+
return createExecuteHistory({
|
|
1444
|
+
id: props.call.id,
|
|
1445
|
+
operation: props.call.operation,
|
|
1446
|
+
arguments: props.call.arguments,
|
|
1447
|
+
value
|
|
1448
|
+
});
|
|
1449
|
+
} catch (error) {
|
|
1450
|
+
return createExecuteHistory({
|
|
1451
|
+
id: props.call.id,
|
|
1452
|
+
operation: props.call.operation,
|
|
1453
|
+
arguments: props.call.arguments,
|
|
1454
|
+
value: error instanceof Error ? {
|
|
1455
|
+
...error,
|
|
1456
|
+
name: error.name,
|
|
1457
|
+
message: error.message
|
|
1458
|
+
} : error
|
|
1459
|
+
});
|
|
1460
|
+
}
|
|
1461
|
+
}
|
|
1462
|
+
|
|
1463
|
+
async function propagateMcp(props) {
|
|
1464
|
+
try {
|
|
1465
|
+
const value = await executeMcpOperation(props.operation, props.call.arguments);
|
|
1466
|
+
return createExecuteHistory({
|
|
1467
|
+
id: props.call.id,
|
|
1468
|
+
operation: props.call.operation,
|
|
1469
|
+
arguments: props.call.arguments,
|
|
1470
|
+
value
|
|
1471
|
+
});
|
|
1472
|
+
} catch (error) {
|
|
1473
|
+
return createExecuteHistory({
|
|
1474
|
+
id: props.call.id,
|
|
1475
|
+
operation: props.call.operation,
|
|
1476
|
+
arguments: props.call.arguments,
|
|
1477
|
+
value: error instanceof Error ? {
|
|
1478
|
+
...error,
|
|
1479
|
+
name: error.name,
|
|
1480
|
+
message: error.message
|
|
1481
|
+
} : error
|
|
1482
|
+
});
|
|
1342
1483
|
}
|
|
1343
1484
|
}
|
|
1344
1485
|
|
|
@@ -1369,6 +1510,36 @@ async function executeClassOperation(operation, operationArguments) {
|
|
|
1369
1510
|
return execute[operation.function.name](operationArguments);
|
|
1370
1511
|
}
|
|
1371
1512
|
|
|
1513
|
+
async function executeMcpOperation(operation, operationArguments) {
|
|
1514
|
+
const {Client} = await import("@modelcontextprotocol/sdk/client/index.js");
|
|
1515
|
+
const {SSEClientTransport} = await import("@modelcontextprotocol/sdk/client/sse.js");
|
|
1516
|
+
const {StdioClientTransport} = await import("@modelcontextprotocol/sdk/client/stdio.js");
|
|
1517
|
+
const client = new Client({
|
|
1518
|
+
name: operation.name,
|
|
1519
|
+
version: "1.0.0"
|
|
1520
|
+
});
|
|
1521
|
+
const transport = (() => {
|
|
1522
|
+
switch (operation.controller.application.transport.type) {
|
|
1523
|
+
case "sse":
|
|
1524
|
+
return new SSEClientTransport(operation.controller.application.transport.url);
|
|
1525
|
+
|
|
1526
|
+
case "stdio":
|
|
1527
|
+
return new StdioClientTransport(operation.controller.application.transport);
|
|
1528
|
+
|
|
1529
|
+
default:
|
|
1530
|
+
operation.controller.application.transport;
|
|
1531
|
+
throw new Error("Unsupported transport type");
|
|
1532
|
+
}
|
|
1533
|
+
})();
|
|
1534
|
+
await client.connect(transport);
|
|
1535
|
+
const result = await client.callTool({
|
|
1536
|
+
method: operation.function.name,
|
|
1537
|
+
name: operation.function.name,
|
|
1538
|
+
arguments: operationArguments
|
|
1539
|
+
});
|
|
1540
|
+
return result.content;
|
|
1541
|
+
}
|
|
1542
|
+
|
|
1372
1543
|
async function correct(ctx, call, retry, error) {
|
|
1373
1544
|
const completionStream = await ctx.request("call", {
|
|
1374
1545
|
messages: [ {
|
|
@@ -1403,7 +1574,7 @@ async function correct(ctx, call, retry, error) {
|
|
|
1403
1574
|
function: {
|
|
1404
1575
|
name: call.operation.name,
|
|
1405
1576
|
description: call.operation.function.description,
|
|
1406
|
-
parameters: call.operation.function.separated !== undefined ? call.operation.function.separated?.llm ?? {
|
|
1577
|
+
parameters: "separated" in call.operation.function && call.operation.function.separated !== undefined ? call.operation.function.separated?.llm ?? {
|
|
1407
1578
|
$defs: {},
|
|
1408
1579
|
type: "object",
|
|
1409
1580
|
properties: {},
|
|
@@ -1545,7 +1716,6 @@ const CONTAINER$1 = {
|
|
|
1545
1716
|
};
|
|
1546
1717
|
|
|
1547
1718
|
async function cancel(ctx) {
|
|
1548
|
-
console.error("orchestrate.cancel");
|
|
1549
1719
|
if (ctx.operations.divided === undefined) {
|
|
1550
1720
|
return step$1(ctx, ctx.operations.array, 0);
|
|
1551
1721
|
}
|
|
@@ -1966,6 +2136,8 @@ const FUNCTION = {
|
|
|
1966
2136
|
title: "Type schema info of the ChatGPT",
|
|
1967
2137
|
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```',
|
|
1968
2138
|
anyOf: [ {
|
|
2139
|
+
$ref: "#/$defs/IChatGptSchema.IObject"
|
|
2140
|
+
}, {
|
|
1969
2141
|
type: "object",
|
|
1970
2142
|
properties: {
|
|
1971
2143
|
enum: {
|
|
@@ -2151,8 +2323,6 @@ const FUNCTION = {
|
|
|
2151
2323
|
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> ```'
|
|
2152
2324
|
}, {
|
|
2153
2325
|
$ref: "#/$defs/IChatGptSchema.IArray"
|
|
2154
|
-
}, {
|
|
2155
|
-
$ref: "#/$defs/IChatGptSchema.IObject"
|
|
2156
2326
|
}, {
|
|
2157
2327
|
type: "object",
|
|
2158
2328
|
properties: {
|
|
@@ -2264,49 +2434,6 @@ const FUNCTION = {
|
|
|
2264
2434
|
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> ```'
|
|
2265
2435
|
} ]
|
|
2266
2436
|
},
|
|
2267
|
-
"IChatGptSchema.IArray": {
|
|
2268
|
-
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>`.",
|
|
2269
|
-
type: "object",
|
|
2270
|
-
properties: {
|
|
2271
|
-
items: {
|
|
2272
|
-
title: "Items type info",
|
|
2273
|
-
$ref: "#/$defs/IChatGptSchema"
|
|
2274
|
-
},
|
|
2275
|
-
type: {
|
|
2276
|
-
title: "Discriminator value of the type",
|
|
2277
|
-
description: "Discriminator value of the type.",
|
|
2278
|
-
type: "string",
|
|
2279
|
-
enum: [ "array" ]
|
|
2280
|
-
},
|
|
2281
|
-
title: {
|
|
2282
|
-
title: "Title of the schema",
|
|
2283
|
-
description: "Title of the schema.",
|
|
2284
|
-
type: "string"
|
|
2285
|
-
},
|
|
2286
|
-
description: {
|
|
2287
|
-
title: "Detailed description of the schema",
|
|
2288
|
-
description: "Detailed description of the schema.",
|
|
2289
|
-
type: "string"
|
|
2290
|
-
},
|
|
2291
|
-
deprecated: {
|
|
2292
|
-
title: "Whether the type is deprecated or not",
|
|
2293
|
-
description: "Whether the type is deprecated or not.",
|
|
2294
|
-
type: "boolean"
|
|
2295
|
-
},
|
|
2296
|
-
example: {
|
|
2297
|
-
title: "Example value",
|
|
2298
|
-
description: "Example value."
|
|
2299
|
-
},
|
|
2300
|
-
examples: {
|
|
2301
|
-
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",
|
|
2302
|
-
type: "object",
|
|
2303
|
-
properties: {},
|
|
2304
|
-
required: [],
|
|
2305
|
-
additionalProperties: {}
|
|
2306
|
-
}
|
|
2307
|
-
},
|
|
2308
|
-
required: [ "items", "type" ]
|
|
2309
|
-
},
|
|
2310
2437
|
"IChatGptSchema.IObject": {
|
|
2311
2438
|
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.",
|
|
2312
2439
|
type: "object",
|
|
@@ -2320,6 +2447,8 @@ const FUNCTION = {
|
|
|
2320
2447
|
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`.",
|
|
2321
2448
|
anyOf: [ {
|
|
2322
2449
|
type: "boolean"
|
|
2450
|
+
}, {
|
|
2451
|
+
$ref: "#/$defs/IChatGptSchema.IObject"
|
|
2323
2452
|
}, {
|
|
2324
2453
|
type: "object",
|
|
2325
2454
|
properties: {
|
|
@@ -2506,8 +2635,6 @@ const FUNCTION = {
|
|
|
2506
2635
|
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> ```'
|
|
2507
2636
|
}, {
|
|
2508
2637
|
$ref: "#/$defs/IChatGptSchema.IArray"
|
|
2509
|
-
}, {
|
|
2510
|
-
$ref: "#/$defs/IChatGptSchema.IObject"
|
|
2511
2638
|
}, {
|
|
2512
2639
|
type: "object",
|
|
2513
2640
|
properties: {
|
|
@@ -2662,6 +2789,49 @@ const FUNCTION = {
|
|
|
2662
2789
|
},
|
|
2663
2790
|
required: [ "properties", "required", "type" ]
|
|
2664
2791
|
},
|
|
2792
|
+
"IChatGptSchema.IArray": {
|
|
2793
|
+
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>`.",
|
|
2794
|
+
type: "object",
|
|
2795
|
+
properties: {
|
|
2796
|
+
items: {
|
|
2797
|
+
title: "Items type info",
|
|
2798
|
+
$ref: "#/$defs/IChatGptSchema"
|
|
2799
|
+
},
|
|
2800
|
+
type: {
|
|
2801
|
+
title: "Discriminator value of the type",
|
|
2802
|
+
description: "Discriminator value of the type.",
|
|
2803
|
+
type: "string",
|
|
2804
|
+
enum: [ "array" ]
|
|
2805
|
+
},
|
|
2806
|
+
title: {
|
|
2807
|
+
title: "Title of the schema",
|
|
2808
|
+
description: "Title of the schema.",
|
|
2809
|
+
type: "string"
|
|
2810
|
+
},
|
|
2811
|
+
description: {
|
|
2812
|
+
title: "Detailed description of the schema",
|
|
2813
|
+
description: "Detailed description of the schema.",
|
|
2814
|
+
type: "string"
|
|
2815
|
+
},
|
|
2816
|
+
deprecated: {
|
|
2817
|
+
title: "Whether the type is deprecated or not",
|
|
2818
|
+
description: "Whether the type is deprecated or not.",
|
|
2819
|
+
type: "boolean"
|
|
2820
|
+
},
|
|
2821
|
+
example: {
|
|
2822
|
+
title: "Example value",
|
|
2823
|
+
description: "Example value."
|
|
2824
|
+
},
|
|
2825
|
+
examples: {
|
|
2826
|
+
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",
|
|
2827
|
+
type: "object",
|
|
2828
|
+
properties: {},
|
|
2829
|
+
required: [],
|
|
2830
|
+
additionalProperties: {}
|
|
2831
|
+
}
|
|
2832
|
+
},
|
|
2833
|
+
required: [ "items", "type" ]
|
|
2834
|
+
},
|
|
2665
2835
|
"IChatGptSchema.IAnyOf": {
|
|
2666
2836
|
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.",
|
|
2667
2837
|
type: "object",
|
|
@@ -2672,6 +2842,8 @@ const FUNCTION = {
|
|
|
2672
2842
|
type: "array",
|
|
2673
2843
|
items: {
|
|
2674
2844
|
anyOf: [ {
|
|
2845
|
+
$ref: "#/$defs/IChatGptSchema.IObject"
|
|
2846
|
+
}, {
|
|
2675
2847
|
type: "object",
|
|
2676
2848
|
properties: {
|
|
2677
2849
|
enum: {
|
|
@@ -2857,8 +3029,6 @@ const FUNCTION = {
|
|
|
2857
3029
|
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> ```'
|
|
2858
3030
|
}, {
|
|
2859
3031
|
$ref: "#/$defs/IChatGptSchema.IArray"
|
|
2860
|
-
}, {
|
|
2861
|
-
$ref: "#/$defs/IChatGptSchema.IObject"
|
|
2862
3032
|
}, {
|
|
2863
3033
|
type: "object",
|
|
2864
3034
|
properties: {
|
|
@@ -3222,6 +3392,8 @@ const FUNCTION = {
|
|
|
3222
3392
|
title: "Expected return type",
|
|
3223
3393
|
description: "Expected return type.\n\nIf the target operation returns nothing (`void`), the `output`\nwould be `undefined`.",
|
|
3224
3394
|
anyOf: [ {
|
|
3395
|
+
$ref: "#/$defs/IChatGptSchema.IObject"
|
|
3396
|
+
}, {
|
|
3225
3397
|
type: "object",
|
|
3226
3398
|
properties: {
|
|
3227
3399
|
enum: {
|
|
@@ -3407,8 +3579,6 @@ const FUNCTION = {
|
|
|
3407
3579
|
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> ```'
|
|
3408
3580
|
}, {
|
|
3409
3581
|
$ref: "#/$defs/IChatGptSchema.IArray"
|
|
3410
|
-
}, {
|
|
3411
|
-
$ref: "#/$defs/IChatGptSchema.IObject"
|
|
3412
3582
|
}, {
|
|
3413
3583
|
type: "object",
|
|
3414
3584
|
properties: {
|
|
@@ -3613,7 +3783,7 @@ async function initialize(ctx) {
|
|
|
3613
3783
|
textContext[choice.index]?.mpsc.close();
|
|
3614
3784
|
continue;
|
|
3615
3785
|
}
|
|
3616
|
-
if (choice.delta.content == null) {
|
|
3786
|
+
if (choice.delta.content == null || choice.delta.content.length === 0) {
|
|
3617
3787
|
continue;
|
|
3618
3788
|
}
|
|
3619
3789
|
if (textContext[choice.index] != null) {
|
|
@@ -3651,7 +3821,7 @@ async function initialize(ctx) {
|
|
|
3651
3821
|
}
|
|
3652
3822
|
const prompts = [];
|
|
3653
3823
|
for (const choice of completion.choices) {
|
|
3654
|
-
if (choice.message.role === "assistant" && choice.message.content != null) {
|
|
3824
|
+
if (choice.message.role === "assistant" && choice.message.content != null && choice.message.content.length !== 0) {
|
|
3655
3825
|
prompts.push(createTextHistory({
|
|
3656
3826
|
role: "assistant",
|
|
3657
3827
|
text: choice.message.content
|
|
@@ -3983,19 +4153,19 @@ async function step(ctx, operations, retry, failures) {
|
|
|
3983
4153
|
}
|
|
3984
4154
|
}
|
|
3985
4155
|
}
|
|
3986
|
-
if (choice.message.role === "assistant" && choice.message.content != null) {
|
|
4156
|
+
if (choice.message.role === "assistant" && choice.message.content != null && choice.message.content.length !== 0) {
|
|
3987
4157
|
const text = createTextHistory({
|
|
3988
4158
|
role: "assistant",
|
|
3989
4159
|
text: choice.message.content
|
|
3990
4160
|
});
|
|
3991
4161
|
prompts.push(text);
|
|
3992
|
-
|
|
4162
|
+
ctx.dispatch(createTextEvent({
|
|
3993
4163
|
role: "assistant",
|
|
3994
4164
|
stream: StreamUtil.to(text.text),
|
|
3995
4165
|
join: async () => Promise.resolve(text.text),
|
|
3996
4166
|
done: () => true,
|
|
3997
4167
|
get: () => text.text
|
|
3998
|
-
}));
|
|
4168
|
+
})).catch((() => {}));
|
|
3999
4169
|
}
|
|
4000
4170
|
}
|
|
4001
4171
|
return prompts;
|
|
@@ -4181,13 +4351,13 @@ class Agentica {
|
|
|
4181
4351
|
role: "user",
|
|
4182
4352
|
text: content
|
|
4183
4353
|
});
|
|
4184
|
-
|
|
4354
|
+
this.dispatch(createTextEvent({
|
|
4185
4355
|
role: "user",
|
|
4186
4356
|
stream: StreamUtil.to(content),
|
|
4187
4357
|
done: () => true,
|
|
4188
4358
|
get: () => content,
|
|
4189
4359
|
join: async () => Promise.resolve(content)
|
|
4190
|
-
}));
|
|
4360
|
+
})).catch((() => {}));
|
|
4191
4361
|
const newbie = await this.executor_(this.getContext({
|
|
4192
4362
|
prompt: text,
|
|
4193
4363
|
usage: this.token_usage_
|
|
@@ -4466,14 +4636,14 @@ function assertHttpLlmApplication(props) {
|
|
|
4466
4636
|
if (undefined === value) return true;
|
|
4467
4637
|
return "object" === typeof value && null !== value && _iu13(value);
|
|
4468
4638
|
}));
|
|
4469
|
-
const _io79 = input => (undefined === input.
|
|
4639
|
+
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));
|
|
4470
4640
|
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;
|
|
4471
4641
|
const _io81 = input => Object.keys(input).every((key => {
|
|
4472
4642
|
const value = input[key];
|
|
4473
4643
|
if (undefined === value) return true;
|
|
4474
4644
|
return "object" === typeof value && null !== value && _io82(value);
|
|
4475
4645
|
}));
|
|
4476
|
-
const _io82 = input => (undefined === input.name || "string" === typeof input.name) && ("
|
|
4646
|
+
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));
|
|
4477
4647
|
const _io83 = input => Object.keys(input).every((key => {
|
|
4478
4648
|
const value = input[key];
|
|
4479
4649
|
if (undefined === value) return true;
|
|
@@ -4537,7 +4707,7 @@ function assertHttpLlmApplication(props) {
|
|
|
4537
4707
|
if (undefined === value) return true;
|
|
4538
4708
|
return "object" === typeof value && null !== value && false === Array.isArray(value) && _iu5(value);
|
|
4539
4709
|
}));
|
|
4540
|
-
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.
|
|
4710
|
+
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;
|
|
4541
4711
|
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;
|
|
4542
4712
|
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))));
|
|
4543
4713
|
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))));
|
|
@@ -4559,7 +4729,7 @@ function assertHttpLlmApplication(props) {
|
|
|
4559
4729
|
return "object" === typeof value && null !== value && false === Array.isArray(value) && _io131(value);
|
|
4560
4730
|
}));
|
|
4561
4731
|
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));
|
|
4562
|
-
const _io132 = input => (undefined === input.name || "string" === typeof input.name) && ("
|
|
4732
|
+
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));
|
|
4563
4733
|
const _io133 = input => Object.keys(input).every((key => {
|
|
4564
4734
|
const value = input[key];
|
|
4565
4735
|
if (undefined === value) return true;
|
|
@@ -4589,7 +4759,7 @@ function assertHttpLlmApplication(props) {
|
|
|
4589
4759
|
if (undefined === value) return true;
|
|
4590
4760
|
return "object" === typeof value && null !== value && _iu20(value);
|
|
4591
4761
|
}));
|
|
4592
|
-
const _io146 = input => (undefined === input.
|
|
4762
|
+
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));
|
|
4593
4763
|
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;
|
|
4594
4764
|
const _io148 = input => Object.keys(input).every((key => {
|
|
4595
4765
|
const value = input[key];
|
|
@@ -4688,7 +4858,7 @@ function assertHttpLlmApplication(props) {
|
|
|
4688
4858
|
}));
|
|
4689
4859
|
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));
|
|
4690
4860
|
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"]);
|
|
4691
|
-
const _io201 = input => (undefined === input.name || "string" === typeof input.name) && ("
|
|
4861
|
+
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));
|
|
4692
4862
|
const _io202 = input => Object.keys(input).every((key => {
|
|
4693
4863
|
const value = input[key];
|
|
4694
4864
|
if (undefined === value) return true;
|
|
@@ -8321,12 +8491,7 @@ function assertHttpLlmApplication(props) {
|
|
|
8321
8491
|
value
|
|
8322
8492
|
}, _errorFactory);
|
|
8323
8493
|
}));
|
|
8324
|
-
const _ao79 = (input, _path, _exceptionable = true) => (undefined === input.
|
|
8325
|
-
method: "typia.assert",
|
|
8326
|
-
path: _path + ".name",
|
|
8327
|
-
expected: "(string | undefined)",
|
|
8328
|
-
value: input.name
|
|
8329
|
-
}, _errorFactory)) && (undefined === input.required || "boolean" === typeof input.required || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
8494
|
+
const _ao79 = (input, _path, _exceptionable = true) => (undefined === input.required || "boolean" === typeof input.required || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
8330
8495
|
method: "typia.assert",
|
|
8331
8496
|
path: _path + ".required",
|
|
8332
8497
|
expected: "(boolean | undefined)",
|
|
@@ -8346,6 +8511,11 @@ function assertHttpLlmApplication(props) {
|
|
|
8346
8511
|
path: _path + ".examples",
|
|
8347
8512
|
expected: "(Record<string, IExample | IReference<`#/components/examples/${string}`>> | undefined)",
|
|
8348
8513
|
value: input.examples
|
|
8514
|
+
}, _errorFactory)) && (undefined === input.name || "string" === typeof input.name || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
8515
|
+
method: "typia.assert",
|
|
8516
|
+
path: _path + ".name",
|
|
8517
|
+
expected: "(string | undefined)",
|
|
8518
|
+
value: input.name
|
|
8349
8519
|
}, _errorFactory)) && (("object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
8350
8520
|
method: "typia.assert",
|
|
8351
8521
|
path: _path + ".schema",
|
|
@@ -8413,7 +8583,7 @@ function assertHttpLlmApplication(props) {
|
|
|
8413
8583
|
path: _path + ".name",
|
|
8414
8584
|
expected: "(string | undefined)",
|
|
8415
8585
|
value: input.name
|
|
8416
|
-
}, _errorFactory)) && ("
|
|
8586
|
+
}, _errorFactory)) && ("path" === input["in"] || "query" === input["in"] || "header" === input["in"] || "cookie" === input["in"] || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
8417
8587
|
method: "typia.assert",
|
|
8418
8588
|
path: _path + '["in"]',
|
|
8419
8589
|
expected: '("cookie" | "header" | "path" | "query")',
|
|
@@ -9552,16 +9722,6 @@ function assertHttpLlmApplication(props) {
|
|
|
9552
9722
|
path: _path + ".maximum",
|
|
9553
9723
|
expected: "(number | undefined)",
|
|
9554
9724
|
value: input.maximum
|
|
9555
|
-
}, _errorFactory)) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum || "boolean" === typeof input.exclusiveMinimum || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
9556
|
-
method: "typia.assert",
|
|
9557
|
-
path: _path + ".exclusiveMinimum",
|
|
9558
|
-
expected: "(boolean | number | undefined)",
|
|
9559
|
-
value: input.exclusiveMinimum
|
|
9560
|
-
}, _errorFactory)) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum || "boolean" === typeof input.exclusiveMaximum || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
9561
|
-
method: "typia.assert",
|
|
9562
|
-
path: _path + ".exclusiveMaximum",
|
|
9563
|
-
expected: "(boolean | number | undefined)",
|
|
9564
|
-
value: input.exclusiveMaximum
|
|
9565
9725
|
}, _errorFactory)) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && (0 < input.multipleOf || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
9566
9726
|
method: "typia.assert",
|
|
9567
9727
|
path: _path + ".multipleOf",
|
|
@@ -9572,6 +9732,16 @@ function assertHttpLlmApplication(props) {
|
|
|
9572
9732
|
path: _path + ".multipleOf",
|
|
9573
9733
|
expected: "((number & ExclusiveMinimum<0>) | undefined)",
|
|
9574
9734
|
value: input.multipleOf
|
|
9735
|
+
}, _errorFactory)) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum || "boolean" === typeof input.exclusiveMinimum || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
9736
|
+
method: "typia.assert",
|
|
9737
|
+
path: _path + ".exclusiveMinimum",
|
|
9738
|
+
expected: "(boolean | number | undefined)",
|
|
9739
|
+
value: input.exclusiveMinimum
|
|
9740
|
+
}, _errorFactory)) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum || "boolean" === typeof input.exclusiveMaximum || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
9741
|
+
method: "typia.assert",
|
|
9742
|
+
path: _path + ".exclusiveMaximum",
|
|
9743
|
+
expected: "(boolean | number | undefined)",
|
|
9744
|
+
value: input.exclusiveMaximum
|
|
9575
9745
|
}, _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, {
|
|
9576
9746
|
method: "typia.assert",
|
|
9577
9747
|
path: _path + ".maxLength",
|
|
@@ -10929,7 +11099,7 @@ function assertHttpLlmApplication(props) {
|
|
|
10929
11099
|
path: _path + ".name",
|
|
10930
11100
|
expected: "(string | undefined)",
|
|
10931
11101
|
value: input.name
|
|
10932
|
-
}, _errorFactory)) && ("
|
|
11102
|
+
}, _errorFactory)) && ("path" === input["in"] || "query" === input["in"] || "header" === input["in"] || "cookie" === input["in"] || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
10933
11103
|
method: "typia.assert",
|
|
10934
11104
|
path: _path + '["in"]',
|
|
10935
11105
|
expected: '("cookie" | "header" | "path" | "query")',
|
|
@@ -11369,12 +11539,7 @@ function assertHttpLlmApplication(props) {
|
|
|
11369
11539
|
value
|
|
11370
11540
|
}, _errorFactory);
|
|
11371
11541
|
}));
|
|
11372
|
-
const _ao146 = (input, _path, _exceptionable = true) => (undefined === input.
|
|
11373
|
-
method: "typia.assert",
|
|
11374
|
-
path: _path + ".name",
|
|
11375
|
-
expected: "(string | undefined)",
|
|
11376
|
-
value: input.name
|
|
11377
|
-
}, _errorFactory)) && (undefined === input.required || "boolean" === typeof input.required || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
11542
|
+
const _ao146 = (input, _path, _exceptionable = true) => (undefined === input.required || "boolean" === typeof input.required || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
11378
11543
|
method: "typia.assert",
|
|
11379
11544
|
path: _path + ".required",
|
|
11380
11545
|
expected: "(boolean | undefined)",
|
|
@@ -11394,6 +11559,11 @@ function assertHttpLlmApplication(props) {
|
|
|
11394
11559
|
path: _path + ".examples",
|
|
11395
11560
|
expected: "(Record<string, IExample | IReference<`#/components/examples/${string}`>>.o1 | undefined)",
|
|
11396
11561
|
value: input.examples
|
|
11562
|
+
}, _errorFactory)) && (undefined === input.name || "string" === typeof input.name || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
11563
|
+
method: "typia.assert",
|
|
11564
|
+
path: _path + ".name",
|
|
11565
|
+
expected: "(string | undefined)",
|
|
11566
|
+
value: input.name
|
|
11397
11567
|
}, _errorFactory)) && (("object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
11398
11568
|
method: "typia.assert",
|
|
11399
11569
|
path: _path + ".schema",
|
|
@@ -13273,7 +13443,7 @@ function assertHttpLlmApplication(props) {
|
|
|
13273
13443
|
path: _path + ".name",
|
|
13274
13444
|
expected: "(string | undefined)",
|
|
13275
13445
|
value: input.name
|
|
13276
|
-
}, _errorFactory)) && ("
|
|
13446
|
+
}, _errorFactory)) && ("path" === input["in"] || "query" === input["in"] || "header" === input["in"] || "cookie" === input["in"] || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
13277
13447
|
method: "typia.assert",
|
|
13278
13448
|
path: _path + '["in"]',
|
|
13279
13449
|
expected: '("cookie" | "header" | "path" | "query")',
|
|
@@ -13686,6 +13856,37 @@ function assertHttpLlmApplication(props) {
|
|
|
13686
13856
|
});
|
|
13687
13857
|
}
|
|
13688
13858
|
|
|
13859
|
+
async function assertMcpLlmApplication(props) {
|
|
13860
|
+
const client = new Client({
|
|
13861
|
+
name: "get_tool_list",
|
|
13862
|
+
version: "1.0.0"
|
|
13863
|
+
});
|
|
13864
|
+
const transport = (() => {
|
|
13865
|
+
switch (props.type) {
|
|
13866
|
+
case "sse":
|
|
13867
|
+
return new SSEClientTransport(props.url);
|
|
13868
|
+
|
|
13869
|
+
case "stdio":
|
|
13870
|
+
return new StdioClientTransport(props);
|
|
13871
|
+
|
|
13872
|
+
default:
|
|
13873
|
+
throw new Error("Invalid transport type");
|
|
13874
|
+
}
|
|
13875
|
+
})();
|
|
13876
|
+
await client.connect(transport);
|
|
13877
|
+
const toolList = await client.request({
|
|
13878
|
+
method: "tools/list"
|
|
13879
|
+
}, ListToolsResultSchema);
|
|
13880
|
+
return {
|
|
13881
|
+
functions: toolList.tools.map((tool => ({
|
|
13882
|
+
name: tool.name,
|
|
13883
|
+
description: tool.description,
|
|
13884
|
+
parameters: tool.inputSchema
|
|
13885
|
+
}))),
|
|
13886
|
+
transport: props
|
|
13887
|
+
};
|
|
13888
|
+
}
|
|
13889
|
+
|
|
13689
13890
|
function validateHttpLlmApplication(props) {
|
|
13690
13891
|
const inspect = (() => {
|
|
13691
13892
|
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))));
|
|
@@ -13827,14 +14028,14 @@ function validateHttpLlmApplication(props) {
|
|
|
13827
14028
|
if (undefined === value) return true;
|
|
13828
14029
|
return "object" === typeof value && null !== value && _iu13(value);
|
|
13829
14030
|
}));
|
|
13830
|
-
const _io79 = input => (undefined === input.
|
|
14031
|
+
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));
|
|
13831
14032
|
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;
|
|
13832
14033
|
const _io81 = input => Object.keys(input).every((key => {
|
|
13833
14034
|
const value = input[key];
|
|
13834
14035
|
if (undefined === value) return true;
|
|
13835
14036
|
return "object" === typeof value && null !== value && _io82(value);
|
|
13836
14037
|
}));
|
|
13837
|
-
const _io82 = input => (undefined === input.name || "string" === typeof input.name) && ("
|
|
14038
|
+
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));
|
|
13838
14039
|
const _io83 = input => Object.keys(input).every((key => {
|
|
13839
14040
|
const value = input[key];
|
|
13840
14041
|
if (undefined === value) return true;
|
|
@@ -13898,7 +14099,7 @@ function validateHttpLlmApplication(props) {
|
|
|
13898
14099
|
if (undefined === value) return true;
|
|
13899
14100
|
return "object" === typeof value && null !== value && false === Array.isArray(value) && _iu5(value);
|
|
13900
14101
|
}));
|
|
13901
|
-
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.
|
|
14102
|
+
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;
|
|
13902
14103
|
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;
|
|
13903
14104
|
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))));
|
|
13904
14105
|
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))));
|
|
@@ -13920,7 +14121,7 @@ function validateHttpLlmApplication(props) {
|
|
|
13920
14121
|
return "object" === typeof value && null !== value && false === Array.isArray(value) && _io131(value);
|
|
13921
14122
|
}));
|
|
13922
14123
|
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));
|
|
13923
|
-
const _io132 = input => (undefined === input.name || "string" === typeof input.name) && ("
|
|
14124
|
+
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));
|
|
13924
14125
|
const _io133 = input => Object.keys(input).every((key => {
|
|
13925
14126
|
const value = input[key];
|
|
13926
14127
|
if (undefined === value) return true;
|
|
@@ -13950,7 +14151,7 @@ function validateHttpLlmApplication(props) {
|
|
|
13950
14151
|
if (undefined === value) return true;
|
|
13951
14152
|
return "object" === typeof value && null !== value && _iu20(value);
|
|
13952
14153
|
}));
|
|
13953
|
-
const _io146 = input => (undefined === input.
|
|
14154
|
+
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));
|
|
13954
14155
|
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;
|
|
13955
14156
|
const _io148 = input => Object.keys(input).every((key => {
|
|
13956
14157
|
const value = input[key];
|
|
@@ -14049,7 +14250,7 @@ function validateHttpLlmApplication(props) {
|
|
|
14049
14250
|
}));
|
|
14050
14251
|
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));
|
|
14051
14252
|
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"]);
|
|
14052
|
-
const _io201 = input => (undefined === input.name || "string" === typeof input.name) && ("
|
|
14253
|
+
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));
|
|
14053
14254
|
const _io202 = input => Object.keys(input).every((key => {
|
|
14054
14255
|
const value = input[key];
|
|
14055
14256
|
if (undefined === value) return true;
|
|
@@ -17006,11 +17207,7 @@ function validateHttpLlmApplication(props) {
|
|
|
17006
17207
|
value
|
|
17007
17208
|
});
|
|
17008
17209
|
})).every((flag => flag)) ].every((flag => flag));
|
|
17009
|
-
const _vo79 = (input, _path, _exceptionable = true) => [ undefined === input.
|
|
17010
|
-
path: _path + ".name",
|
|
17011
|
-
expected: "(string | undefined)",
|
|
17012
|
-
value: input.name
|
|
17013
|
-
}), undefined === input.required || "boolean" === typeof input.required || _report(_exceptionable, {
|
|
17210
|
+
const _vo79 = (input, _path, _exceptionable = true) => [ undefined === input.required || "boolean" === typeof input.required || _report(_exceptionable, {
|
|
17014
17211
|
path: _path + ".required",
|
|
17015
17212
|
expected: "(boolean | undefined)",
|
|
17016
17213
|
value: input.required
|
|
@@ -17026,6 +17223,10 @@ function validateHttpLlmApplication(props) {
|
|
|
17026
17223
|
path: _path + ".examples",
|
|
17027
17224
|
expected: "(Record<string, IExample | IReference<`#/components/examples/${string}`>> | undefined)",
|
|
17028
17225
|
value: input.examples
|
|
17226
|
+
}), undefined === input.name || "string" === typeof input.name || _report(_exceptionable, {
|
|
17227
|
+
path: _path + ".name",
|
|
17228
|
+
expected: "(string | undefined)",
|
|
17229
|
+
value: input.name
|
|
17029
17230
|
}), ("object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) || _report(_exceptionable, {
|
|
17030
17231
|
path: _path + ".schema",
|
|
17031
17232
|
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)",
|
|
@@ -17081,7 +17282,7 @@ function validateHttpLlmApplication(props) {
|
|
|
17081
17282
|
path: _path + ".name",
|
|
17082
17283
|
expected: "(string | undefined)",
|
|
17083
17284
|
value: input.name
|
|
17084
|
-
}), "
|
|
17285
|
+
}), "path" === input["in"] || "query" === input["in"] || "header" === input["in"] || "cookie" === input["in"] || _report(_exceptionable, {
|
|
17085
17286
|
path: _path + '["in"]',
|
|
17086
17287
|
expected: '("cookie" | "header" | "path" | "query")',
|
|
17087
17288
|
value: input["in"]
|
|
@@ -18005,14 +18206,6 @@ function validateHttpLlmApplication(props) {
|
|
|
18005
18206
|
path: _path + ".maximum",
|
|
18006
18207
|
expected: "(number | undefined)",
|
|
18007
18208
|
value: input.maximum
|
|
18008
|
-
}), undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum || "boolean" === typeof input.exclusiveMinimum || _report(_exceptionable, {
|
|
18009
|
-
path: _path + ".exclusiveMinimum",
|
|
18010
|
-
expected: "(boolean | number | undefined)",
|
|
18011
|
-
value: input.exclusiveMinimum
|
|
18012
|
-
}), undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum || "boolean" === typeof input.exclusiveMaximum || _report(_exceptionable, {
|
|
18013
|
-
path: _path + ".exclusiveMaximum",
|
|
18014
|
-
expected: "(boolean | number | undefined)",
|
|
18015
|
-
value: input.exclusiveMaximum
|
|
18016
18209
|
}), undefined === input.multipleOf || "number" === typeof input.multipleOf && (0 < input.multipleOf || _report(_exceptionable, {
|
|
18017
18210
|
path: _path + ".multipleOf",
|
|
18018
18211
|
expected: "number & ExclusiveMinimum<0>",
|
|
@@ -18021,6 +18214,14 @@ function validateHttpLlmApplication(props) {
|
|
|
18021
18214
|
path: _path + ".multipleOf",
|
|
18022
18215
|
expected: "((number & ExclusiveMinimum<0>) | undefined)",
|
|
18023
18216
|
value: input.multipleOf
|
|
18217
|
+
}), undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum || "boolean" === typeof input.exclusiveMinimum || _report(_exceptionable, {
|
|
18218
|
+
path: _path + ".exclusiveMinimum",
|
|
18219
|
+
expected: "(boolean | number | undefined)",
|
|
18220
|
+
value: input.exclusiveMinimum
|
|
18221
|
+
}), undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum || "boolean" === typeof input.exclusiveMaximum || _report(_exceptionable, {
|
|
18222
|
+
path: _path + ".exclusiveMaximum",
|
|
18223
|
+
expected: "(boolean | number | undefined)",
|
|
18224
|
+
value: input.exclusiveMaximum
|
|
18024
18225
|
}), undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 0x10000000000000000 || _report(_exceptionable, {
|
|
18025
18226
|
path: _path + ".maxLength",
|
|
18026
18227
|
expected: 'number & Type<"uint64">',
|
|
@@ -19111,7 +19312,7 @@ function validateHttpLlmApplication(props) {
|
|
|
19111
19312
|
path: _path + ".name",
|
|
19112
19313
|
expected: "(string | undefined)",
|
|
19113
19314
|
value: input.name
|
|
19114
|
-
}), "
|
|
19315
|
+
}), "path" === input["in"] || "query" === input["in"] || "header" === input["in"] || "cookie" === input["in"] || _report(_exceptionable, {
|
|
19115
19316
|
path: _path + '["in"]',
|
|
19116
19317
|
expected: '("cookie" | "header" | "path" | "query")',
|
|
19117
19318
|
value: input["in"]
|
|
@@ -19469,11 +19670,7 @@ function validateHttpLlmApplication(props) {
|
|
|
19469
19670
|
value
|
|
19470
19671
|
});
|
|
19471
19672
|
})).every((flag => flag)) ].every((flag => flag));
|
|
19472
|
-
const _vo146 = (input, _path, _exceptionable = true) => [ undefined === input.
|
|
19473
|
-
path: _path + ".name",
|
|
19474
|
-
expected: "(string | undefined)",
|
|
19475
|
-
value: input.name
|
|
19476
|
-
}), undefined === input.required || "boolean" === typeof input.required || _report(_exceptionable, {
|
|
19673
|
+
const _vo146 = (input, _path, _exceptionable = true) => [ undefined === input.required || "boolean" === typeof input.required || _report(_exceptionable, {
|
|
19477
19674
|
path: _path + ".required",
|
|
19478
19675
|
expected: "(boolean | undefined)",
|
|
19479
19676
|
value: input.required
|
|
@@ -19489,6 +19686,10 @@ function validateHttpLlmApplication(props) {
|
|
|
19489
19686
|
path: _path + ".examples",
|
|
19490
19687
|
expected: "(Record<string, IExample | IReference<`#/components/examples/${string}`>>.o1 | undefined)",
|
|
19491
19688
|
value: input.examples
|
|
19689
|
+
}), undefined === input.name || "string" === typeof input.name || _report(_exceptionable, {
|
|
19690
|
+
path: _path + ".name",
|
|
19691
|
+
expected: "(string | undefined)",
|
|
19692
|
+
value: input.name
|
|
19492
19693
|
}), ("object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) || _report(_exceptionable, {
|
|
19493
19694
|
path: _path + ".schema",
|
|
19494
19695
|
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)",
|
|
@@ -21012,7 +21213,7 @@ function validateHttpLlmApplication(props) {
|
|
|
21012
21213
|
path: _path + ".name",
|
|
21013
21214
|
expected: "(string | undefined)",
|
|
21014
21215
|
value: input.name
|
|
21015
|
-
}), "
|
|
21216
|
+
}), "path" === input["in"] || "query" === input["in"] || "header" === input["in"] || "cookie" === input["in"] || _report(_exceptionable, {
|
|
21016
21217
|
path: _path + '["in"]',
|
|
21017
21218
|
expected: '("cookie" | "header" | "path" | "query")',
|
|
21018
21219
|
value: input["in"]
|
|
@@ -21417,13 +21618,13 @@ class MicroAgentica {
|
|
|
21417
21618
|
role: "user",
|
|
21418
21619
|
text: content
|
|
21419
21620
|
});
|
|
21420
|
-
|
|
21621
|
+
this.dispatch(createTextEvent({
|
|
21421
21622
|
role: "user",
|
|
21422
21623
|
stream: StreamUtil.to(content),
|
|
21423
21624
|
done: () => true,
|
|
21424
21625
|
get: () => content,
|
|
21425
21626
|
join: async () => Promise.resolve(content)
|
|
21426
|
-
}));
|
|
21627
|
+
})).catch((() => {}));
|
|
21427
21628
|
const ctx = this.getContext({
|
|
21428
21629
|
prompt: talk,
|
|
21429
21630
|
usage: this.token_usage_
|
|
@@ -21542,5 +21743,5 @@ var index = Object.freeze({
|
|
|
21542
21743
|
StreamUtil
|
|
21543
21744
|
});
|
|
21544
21745
|
|
|
21545
|
-
export { Agentica, AgenticaTokenUsage, MicroAgentica, assertHttpLlmApplication, index$2 as factory, index$1 as orchestrate, index as utils, validateHttpLlmApplication };
|
|
21746
|
+
export { Agentica, AgenticaTokenUsage, MicroAgentica, assertHttpLlmApplication, assertMcpLlmApplication, index$2 as factory, index$1 as orchestrate, index as utils, validateHttpLlmApplication };
|
|
21546
21747
|
//# sourceMappingURL=index.mjs.map
|