@agentica/core 0.19.0 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/context/AgenticaOperation.d.ts +3 -4
- package/lib/context/internal/AgenticaOperationComposer.js +8 -1
- package/lib/context/internal/AgenticaOperationComposer.js.map +1 -1
- package/lib/context/internal/AgenticaOperationComposer.spec.js +39 -10
- package/lib/context/internal/AgenticaOperationComposer.spec.js.map +1 -1
- package/lib/functional/assertHttpLlmApplication.js +168 -168
- package/lib/functional/assertMcpController.d.ts +24 -0
- package/lib/functional/assertMcpController.js +1701 -0
- package/lib/functional/assertMcpController.js.map +1 -0
- package/lib/functional/validateHttpLlmApplication.js +148 -148
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +2013 -404
- package/lib/index.mjs.map +1 -1
- package/lib/orchestrate/call.js +11 -1
- package/lib/orchestrate/call.js.map +1 -1
- package/lib/orchestrate/initialize.js +60 -60
- package/lib/structures/IAgenticaController.d.ts +8 -4
- package/lib/structures/mcp/index.d.ts +0 -2
- package/lib/structures/mcp/index.js +0 -2
- package/lib/structures/mcp/index.js.map +1 -1
- package/lib/utils/AsyncQueue.d.ts +10 -0
- package/lib/utils/AsyncQueue.js +33 -9
- package/lib/utils/AsyncQueue.js.map +1 -1
- package/lib/utils/AsyncQueue.spec.d.ts +1 -0
- package/lib/utils/AsyncQueue.spec.js +280 -0
- package/lib/utils/AsyncQueue.spec.js.map +1 -0
- package/lib/utils/MPSC.spec.d.ts +1 -0
- package/lib/utils/MPSC.spec.js +222 -0
- package/lib/utils/MPSC.spec.js.map +1 -0
- package/lib/utils/StreamUtil.spec.d.ts +1 -0
- package/lib/utils/StreamUtil.spec.js +471 -0
- package/lib/utils/StreamUtil.spec.js.map +1 -0
- package/package.json +3 -3
- package/src/context/AgenticaOperation.ts +5 -6
- package/src/context/internal/AgenticaOperationComposer.spec.ts +45 -14
- package/src/context/internal/AgenticaOperationComposer.ts +10 -2
- package/src/functional/assertMcpController.ts +49 -0
- package/src/index.ts +1 -1
- package/src/orchestrate/call.ts +14 -4
- package/src/structures/IAgenticaController.ts +9 -4
- package/src/structures/mcp/index.ts +0 -2
- package/src/utils/AsyncQueue.spec.ts +355 -0
- package/src/utils/AsyncQueue.ts +36 -8
- package/src/utils/MPSC.spec.ts +276 -0
- package/src/utils/StreamUtil.spec.ts +520 -0
- package/lib/functional/assertMcpLlmApplication.d.ts +0 -18
- package/lib/functional/assertMcpLlmApplication.js +0 -74
- package/lib/functional/assertMcpLlmApplication.js.map +0 -1
- package/lib/structures/mcp/IMcpLlmApplication.d.ts +0 -9
- package/lib/structures/mcp/IMcpLlmApplication.js +0 -3
- package/lib/structures/mcp/IMcpLlmApplication.js.map +0 -1
- package/lib/structures/mcp/IMcpLlmFunction.d.ts +0 -17
- package/lib/structures/mcp/IMcpLlmFunction.js +0 -3
- package/lib/structures/mcp/IMcpLlmFunction.js.map +0 -1
- package/src/functional/assertMcpLlmApplication.ts +0 -32
- package/src/structures/mcp/IMcpLlmApplication.ts +0 -10
- package/src/structures/mcp/IMcpLlmFunction.ts +0 -19
|
@@ -85,9 +85,6 @@ const FUNCTION = {
|
|
|
85
85
|
title: "Type schema info of the ChatGPT",
|
|
86
86
|
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```",
|
|
87
87
|
anyOf: [
|
|
88
|
-
{
|
|
89
|
-
$ref: "#/$defs/IChatGptSchema.IObject"
|
|
90
|
-
},
|
|
91
88
|
{
|
|
92
89
|
type: "object",
|
|
93
90
|
properties: {
|
|
@@ -295,6 +292,9 @@ const FUNCTION = {
|
|
|
295
292
|
{
|
|
296
293
|
$ref: "#/$defs/IChatGptSchema.IArray"
|
|
297
294
|
},
|
|
295
|
+
{
|
|
296
|
+
$ref: "#/$defs/IChatGptSchema.IObject"
|
|
297
|
+
},
|
|
298
298
|
{
|
|
299
299
|
type: "object",
|
|
300
300
|
properties: {
|
|
@@ -416,6 +416,54 @@ const FUNCTION = {
|
|
|
416
416
|
}
|
|
417
417
|
]
|
|
418
418
|
},
|
|
419
|
+
"IChatGptSchema.IArray": {
|
|
420
|
+
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>`.",
|
|
421
|
+
type: "object",
|
|
422
|
+
properties: {
|
|
423
|
+
items: {
|
|
424
|
+
title: "Items type info",
|
|
425
|
+
$ref: "#/$defs/IChatGptSchema"
|
|
426
|
+
},
|
|
427
|
+
type: {
|
|
428
|
+
title: "Discriminator value of the type",
|
|
429
|
+
description: "Discriminator value of the type.",
|
|
430
|
+
type: "string",
|
|
431
|
+
"enum": [
|
|
432
|
+
"array"
|
|
433
|
+
]
|
|
434
|
+
},
|
|
435
|
+
title: {
|
|
436
|
+
title: "Title of the schema",
|
|
437
|
+
description: "Title of the schema.",
|
|
438
|
+
type: "string"
|
|
439
|
+
},
|
|
440
|
+
description: {
|
|
441
|
+
title: "Detailed description of the schema",
|
|
442
|
+
description: "Detailed description of the schema.",
|
|
443
|
+
type: "string"
|
|
444
|
+
},
|
|
445
|
+
deprecated: {
|
|
446
|
+
title: "Whether the type is deprecated or not",
|
|
447
|
+
description: "Whether the type is deprecated or not.",
|
|
448
|
+
type: "boolean"
|
|
449
|
+
},
|
|
450
|
+
example: {
|
|
451
|
+
title: "Example value",
|
|
452
|
+
description: "Example value."
|
|
453
|
+
},
|
|
454
|
+
examples: {
|
|
455
|
+
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",
|
|
456
|
+
type: "object",
|
|
457
|
+
properties: {},
|
|
458
|
+
required: [],
|
|
459
|
+
additionalProperties: {}
|
|
460
|
+
}
|
|
461
|
+
},
|
|
462
|
+
required: [
|
|
463
|
+
"items",
|
|
464
|
+
"type"
|
|
465
|
+
]
|
|
466
|
+
},
|
|
419
467
|
"IChatGptSchema.IObject": {
|
|
420
468
|
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.",
|
|
421
469
|
type: "object",
|
|
@@ -431,9 +479,6 @@ const FUNCTION = {
|
|
|
431
479
|
{
|
|
432
480
|
type: "boolean"
|
|
433
481
|
},
|
|
434
|
-
{
|
|
435
|
-
$ref: "#/$defs/IChatGptSchema.IObject"
|
|
436
|
-
},
|
|
437
482
|
{
|
|
438
483
|
type: "object",
|
|
439
484
|
properties: {
|
|
@@ -641,6 +686,9 @@ const FUNCTION = {
|
|
|
641
686
|
{
|
|
642
687
|
$ref: "#/$defs/IChatGptSchema.IArray"
|
|
643
688
|
},
|
|
689
|
+
{
|
|
690
|
+
$ref: "#/$defs/IChatGptSchema.IObject"
|
|
691
|
+
},
|
|
644
692
|
{
|
|
645
693
|
type: "object",
|
|
646
694
|
properties: {
|
|
@@ -811,54 +859,6 @@ const FUNCTION = {
|
|
|
811
859
|
"type"
|
|
812
860
|
]
|
|
813
861
|
},
|
|
814
|
-
"IChatGptSchema.IArray": {
|
|
815
|
-
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>`.",
|
|
816
|
-
type: "object",
|
|
817
|
-
properties: {
|
|
818
|
-
items: {
|
|
819
|
-
title: "Items type info",
|
|
820
|
-
$ref: "#/$defs/IChatGptSchema"
|
|
821
|
-
},
|
|
822
|
-
type: {
|
|
823
|
-
title: "Discriminator value of the type",
|
|
824
|
-
description: "Discriminator value of the type.",
|
|
825
|
-
type: "string",
|
|
826
|
-
"enum": [
|
|
827
|
-
"array"
|
|
828
|
-
]
|
|
829
|
-
},
|
|
830
|
-
title: {
|
|
831
|
-
title: "Title of the schema",
|
|
832
|
-
description: "Title of the schema.",
|
|
833
|
-
type: "string"
|
|
834
|
-
},
|
|
835
|
-
description: {
|
|
836
|
-
title: "Detailed description of the schema",
|
|
837
|
-
description: "Detailed description of the schema.",
|
|
838
|
-
type: "string"
|
|
839
|
-
},
|
|
840
|
-
deprecated: {
|
|
841
|
-
title: "Whether the type is deprecated or not",
|
|
842
|
-
description: "Whether the type is deprecated or not.",
|
|
843
|
-
type: "boolean"
|
|
844
|
-
},
|
|
845
|
-
example: {
|
|
846
|
-
title: "Example value",
|
|
847
|
-
description: "Example value."
|
|
848
|
-
},
|
|
849
|
-
examples: {
|
|
850
|
-
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",
|
|
851
|
-
type: "object",
|
|
852
|
-
properties: {},
|
|
853
|
-
required: [],
|
|
854
|
-
additionalProperties: {}
|
|
855
|
-
}
|
|
856
|
-
},
|
|
857
|
-
required: [
|
|
858
|
-
"items",
|
|
859
|
-
"type"
|
|
860
|
-
]
|
|
861
|
-
},
|
|
862
862
|
"IChatGptSchema.IAnyOf": {
|
|
863
863
|
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.",
|
|
864
864
|
type: "object",
|
|
@@ -869,9 +869,6 @@ const FUNCTION = {
|
|
|
869
869
|
type: "array",
|
|
870
870
|
items: {
|
|
871
871
|
anyOf: [
|
|
872
|
-
{
|
|
873
|
-
$ref: "#/$defs/IChatGptSchema.IObject"
|
|
874
|
-
},
|
|
875
872
|
{
|
|
876
873
|
type: "object",
|
|
877
874
|
properties: {
|
|
@@ -1079,6 +1076,9 @@ const FUNCTION = {
|
|
|
1079
1076
|
{
|
|
1080
1077
|
$ref: "#/$defs/IChatGptSchema.IArray"
|
|
1081
1078
|
},
|
|
1079
|
+
{
|
|
1080
|
+
$ref: "#/$defs/IChatGptSchema.IObject"
|
|
1081
|
+
},
|
|
1082
1082
|
{
|
|
1083
1083
|
type: "object",
|
|
1084
1084
|
properties: {
|
|
@@ -1495,9 +1495,6 @@ const FUNCTION = {
|
|
|
1495
1495
|
title: "Expected return type",
|
|
1496
1496
|
description: "Expected return type.\n\nIf the target operation returns nothing (`void`), the `output`\nwould be `undefined`.",
|
|
1497
1497
|
anyOf: [
|
|
1498
|
-
{
|
|
1499
|
-
$ref: "#/$defs/IChatGptSchema.IObject"
|
|
1500
|
-
},
|
|
1501
1498
|
{
|
|
1502
1499
|
type: "object",
|
|
1503
1500
|
properties: {
|
|
@@ -1705,6 +1702,9 @@ const FUNCTION = {
|
|
|
1705
1702
|
{
|
|
1706
1703
|
$ref: "#/$defs/IChatGptSchema.IArray"
|
|
1707
1704
|
},
|
|
1705
|
+
{
|
|
1706
|
+
$ref: "#/$defs/IChatGptSchema.IObject"
|
|
1707
|
+
},
|
|
1708
1708
|
{
|
|
1709
1709
|
type: "object",
|
|
1710
1710
|
properties: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { IMcpLlmApplication } from "
|
|
1
|
+
import type { Client } from "@modelcontextprotocol/sdk/client/index.d.ts";
|
|
2
|
+
import type { IHttpConnection, IHttpLlmApplication, IHttpLlmFunction, IHttpResponse, ILlmApplication, ILlmFunction, ILlmSchema, IMcpLlmApplication } from "@samchon/openapi";
|
|
3
3
|
/**
|
|
4
4
|
* Controller of the Agentica Agent.
|
|
5
5
|
*
|
|
@@ -16,7 +16,7 @@ import type { IMcpLlmApplication } from "./mcp/IMcpLlmApplication";
|
|
|
16
16
|
*
|
|
17
17
|
* @author Samchon
|
|
18
18
|
*/
|
|
19
|
-
export type IAgenticaController<Model extends ILlmSchema.Model> = IAgenticaController.IHttp<Model> | IAgenticaController.IClass<Model> | IAgenticaController.IMcp
|
|
19
|
+
export type IAgenticaController<Model extends ILlmSchema.Model> = IAgenticaController.IHttp<Model> | IAgenticaController.IClass<Model> | IAgenticaController.IMcp<Model>;
|
|
20
20
|
export declare namespace IAgenticaController {
|
|
21
21
|
/**
|
|
22
22
|
* HTTP controller.
|
|
@@ -96,7 +96,11 @@ export declare namespace IAgenticaController {
|
|
|
96
96
|
/**
|
|
97
97
|
* MCP Server controller.
|
|
98
98
|
*/
|
|
99
|
-
export interface IMcp extends IBase<"mcp", IMcpLlmApplication
|
|
99
|
+
export interface IMcp<Model extends ILlmSchema.Model> extends IBase<"mcp", IMcpLlmApplication<Model>> {
|
|
100
|
+
/**
|
|
101
|
+
* MCP client for connection.
|
|
102
|
+
*/
|
|
103
|
+
client: Client;
|
|
100
104
|
}
|
|
101
105
|
interface IBase<Protocol, Application> {
|
|
102
106
|
/**
|
|
@@ -14,7 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./IMcpLlmApplication"), exports);
|
|
18
|
-
__exportStar(require("./IMcpLlmFunction"), exports);
|
|
19
17
|
__exportStar(require("./IMcpLlmTransportProps"), exports);
|
|
20
18
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/structures/mcp/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/structures/mcp/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC"}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
export declare class AsyncQueueClosedError extends Error {
|
|
2
|
+
constructor(message: string);
|
|
3
|
+
}
|
|
1
4
|
export declare class AsyncQueue<T> {
|
|
2
5
|
private queue;
|
|
3
6
|
private resolvers;
|
|
@@ -10,6 +13,13 @@ export declare class AsyncQueue<T> {
|
|
|
10
13
|
isClosed(): boolean;
|
|
11
14
|
done(): boolean;
|
|
12
15
|
close(): void;
|
|
16
|
+
/**
|
|
17
|
+
* Wait until the queue is empty
|
|
18
|
+
*
|
|
19
|
+
* if the queue is closed, it will not resolve promise
|
|
20
|
+
* this function only check the queue is empty
|
|
21
|
+
* @returns A promise that resolves when the queue is empty
|
|
22
|
+
*/
|
|
13
23
|
waitUntilEmpty(): Promise<void>;
|
|
14
24
|
waitClosed(): Promise<void>;
|
|
15
25
|
}
|
package/lib/utils/AsyncQueue.js
CHANGED
|
@@ -9,7 +9,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.AsyncQueue = void 0;
|
|
12
|
+
exports.AsyncQueue = exports.AsyncQueueClosedError = void 0;
|
|
13
|
+
class AsyncQueueClosedError extends Error {
|
|
14
|
+
constructor(message) {
|
|
15
|
+
super(message);
|
|
16
|
+
this.name = "AsyncQueueClosedError";
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.AsyncQueueClosedError = AsyncQueueClosedError;
|
|
13
20
|
class AsyncQueue {
|
|
14
21
|
constructor() {
|
|
15
22
|
this.queue = [];
|
|
@@ -20,6 +27,10 @@ class AsyncQueue {
|
|
|
20
27
|
}
|
|
21
28
|
enqueue(item) {
|
|
22
29
|
var _a;
|
|
30
|
+
if (this.closed) {
|
|
31
|
+
console.error(new AsyncQueueClosedError("Cannot enqueue item: queue is closed."));
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
23
34
|
this.queue.push(item);
|
|
24
35
|
if (this.resolvers.length > 0) {
|
|
25
36
|
(_a = this.resolvers.shift()) === null || _a === void 0 ? void 0 : _a({ value: this.queue.shift(), done: false });
|
|
@@ -27,15 +38,21 @@ class AsyncQueue {
|
|
|
27
38
|
}
|
|
28
39
|
dequeue() {
|
|
29
40
|
return __awaiter(this, void 0, void 0, function* () {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
if (this.
|
|
35
|
-
|
|
36
|
-
this.emptyResolvers = [];
|
|
41
|
+
const item = (() => {
|
|
42
|
+
if (!this.isEmpty()) {
|
|
43
|
+
return { value: this.queue.shift(), done: false };
|
|
44
|
+
}
|
|
45
|
+
if (this.isClosed()) {
|
|
46
|
+
return { value: undefined, done: true };
|
|
37
47
|
}
|
|
38
|
-
return
|
|
48
|
+
return null;
|
|
49
|
+
})();
|
|
50
|
+
if (this.isEmpty() && this.emptyResolvers.length !== 0) {
|
|
51
|
+
this.emptyResolvers.forEach(resolve => resolve());
|
|
52
|
+
this.emptyResolvers = [];
|
|
53
|
+
}
|
|
54
|
+
if (item !== null) {
|
|
55
|
+
return item;
|
|
39
56
|
}
|
|
40
57
|
return new Promise(resolve => this.resolvers.push(resolve));
|
|
41
58
|
});
|
|
@@ -57,6 +74,13 @@ class AsyncQueue {
|
|
|
57
74
|
}
|
|
58
75
|
this.closeResolvers.forEach(resolve => resolve());
|
|
59
76
|
}
|
|
77
|
+
/**
|
|
78
|
+
* Wait until the queue is empty
|
|
79
|
+
*
|
|
80
|
+
* if the queue is closed, it will not resolve promise
|
|
81
|
+
* this function only check the queue is empty
|
|
82
|
+
* @returns A promise that resolves when the queue is empty
|
|
83
|
+
*/
|
|
60
84
|
waitUntilEmpty() {
|
|
61
85
|
return __awaiter(this, void 0, void 0, function* () {
|
|
62
86
|
if (this.isEmpty()) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AsyncQueue.js","sourceRoot":"","sources":["../../src/utils/AsyncQueue.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,MAAa,UAAU;IAAvB;QACU,UAAK,GAAQ,EAAE,CAAC;QAChB,cAAS,GAAsD,EAAE,CAAC;QAClE,mBAAc,GAAmB,EAAE,CAAC;QACpC,mBAAc,GAAmB,EAAE,CAAC;QACpC,WAAM,GAAG,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"AsyncQueue.js","sourceRoot":"","sources":["../../src/utils/AsyncQueue.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,MAAa,qBAAsB,SAAQ,KAAK;IAC9C,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,uBAAuB,CAAC;IACtC,CAAC;CACF;AALD,sDAKC;AAED,MAAa,UAAU;IAAvB;QACU,UAAK,GAAQ,EAAE,CAAC;QAChB,cAAS,GAAsD,EAAE,CAAC;QAClE,mBAAc,GAAmB,EAAE,CAAC;QACpC,mBAAc,GAAmB,EAAE,CAAC;QACpC,WAAM,GAAG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O,CAAC,CAAC;YACpC,CAAC,CAAC,CAAC;QACL,CAAC;KAAA;CACF;AAvFD,gCAuFC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const AsyncQueue_1 = require("./AsyncQueue");
|
|
13
|
+
describe("the AsyncQueue", () => {
|
|
14
|
+
describe("basic functionality", () => {
|
|
15
|
+
it("enqueue and dequeue test", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
16
|
+
const queue = new AsyncQueue_1.AsyncQueue();
|
|
17
|
+
// Enqueue items
|
|
18
|
+
queue.enqueue(1);
|
|
19
|
+
queue.enqueue(2);
|
|
20
|
+
queue.enqueue(3);
|
|
21
|
+
// Dequeue items
|
|
22
|
+
const result1 = yield queue.dequeue();
|
|
23
|
+
const result2 = yield queue.dequeue();
|
|
24
|
+
const result3 = yield queue.dequeue();
|
|
25
|
+
expect(result1.value).toBe(1);
|
|
26
|
+
expect(result1.done).toBe(false);
|
|
27
|
+
expect(result2.value).toBe(2);
|
|
28
|
+
expect(result2.done).toBe(false);
|
|
29
|
+
expect(result3.value).toBe(3);
|
|
30
|
+
expect(result3.done).toBe(false);
|
|
31
|
+
}));
|
|
32
|
+
it("isEmpty test", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
33
|
+
const queue = new AsyncQueue_1.AsyncQueue();
|
|
34
|
+
expect(queue.isEmpty()).toBe(true);
|
|
35
|
+
queue.enqueue(1);
|
|
36
|
+
expect(queue.isEmpty()).toBe(false);
|
|
37
|
+
yield queue.dequeue();
|
|
38
|
+
expect(queue.isEmpty()).toBe(true);
|
|
39
|
+
}));
|
|
40
|
+
it("isClosed test", () => {
|
|
41
|
+
const queue = new AsyncQueue_1.AsyncQueue();
|
|
42
|
+
expect(queue.isClosed()).toBe(false);
|
|
43
|
+
queue.close();
|
|
44
|
+
expect(queue.isClosed()).toBe(true);
|
|
45
|
+
});
|
|
46
|
+
it("done test", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
47
|
+
const queue = new AsyncQueue_1.AsyncQueue();
|
|
48
|
+
expect(queue.done()).toBe(false);
|
|
49
|
+
queue.enqueue(1);
|
|
50
|
+
expect(queue.done()).toBe(false);
|
|
51
|
+
yield queue.dequeue();
|
|
52
|
+
expect(queue.done()).toBe(false);
|
|
53
|
+
queue.close();
|
|
54
|
+
expect(queue.done()).toBe(true);
|
|
55
|
+
}));
|
|
56
|
+
});
|
|
57
|
+
describe("close functionality", () => {
|
|
58
|
+
it("close test with empty queue", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
59
|
+
const queue = new AsyncQueue_1.AsyncQueue();
|
|
60
|
+
queue.close();
|
|
61
|
+
const result = yield queue.dequeue();
|
|
62
|
+
expect(result.done).toBe(true);
|
|
63
|
+
expect(result.value).toBeUndefined();
|
|
64
|
+
}));
|
|
65
|
+
it("close test with non-empty queue", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
66
|
+
const queue = new AsyncQueue_1.AsyncQueue();
|
|
67
|
+
queue.enqueue(1);
|
|
68
|
+
queue.enqueue(2);
|
|
69
|
+
queue.close();
|
|
70
|
+
const result1 = yield queue.dequeue();
|
|
71
|
+
const result2 = yield queue.dequeue();
|
|
72
|
+
const result3 = yield queue.dequeue();
|
|
73
|
+
expect(result1.value).toBe(1);
|
|
74
|
+
expect(result1.done).toBe(false);
|
|
75
|
+
expect(result2.value).toBe(2);
|
|
76
|
+
expect(result2.done).toBe(false);
|
|
77
|
+
expect(result3.done).toBe(true);
|
|
78
|
+
expect(result3.value).toBeUndefined();
|
|
79
|
+
}));
|
|
80
|
+
it("close test with waiting dequeue", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
81
|
+
const queue = new AsyncQueue_1.AsyncQueue();
|
|
82
|
+
// Start dequeue before enqueue
|
|
83
|
+
const dequeuePromise = queue.dequeue();
|
|
84
|
+
// Close the queue
|
|
85
|
+
queue.close();
|
|
86
|
+
const result = yield dequeuePromise;
|
|
87
|
+
expect(result.done).toBe(true);
|
|
88
|
+
expect(result.value).toBeUndefined();
|
|
89
|
+
}));
|
|
90
|
+
});
|
|
91
|
+
describe("waitUntilEmpty functionality", () => {
|
|
92
|
+
it("waitUntilEmpty test with empty queue", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
93
|
+
const queue = new AsyncQueue_1.AsyncQueue();
|
|
94
|
+
// Should resolve immediately since queue is empty
|
|
95
|
+
yield queue.waitUntilEmpty();
|
|
96
|
+
queue.enqueue(1);
|
|
97
|
+
const result = yield queue.dequeue();
|
|
98
|
+
expect(result.value).toBe(1);
|
|
99
|
+
expect(result.done).toBe(false);
|
|
100
|
+
}));
|
|
101
|
+
it("waitUntilEmpty test with non-empty queue", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
102
|
+
const queue = new AsyncQueue_1.AsyncQueue();
|
|
103
|
+
queue.enqueue(1);
|
|
104
|
+
queue.enqueue(2);
|
|
105
|
+
// waitUntilEmpty should not resolve since queue is not empty
|
|
106
|
+
const waitPromise = queue.waitUntilEmpty();
|
|
107
|
+
// Dequeue first value
|
|
108
|
+
const result1 = yield queue.dequeue();
|
|
109
|
+
expect(result1.value).toBe(1);
|
|
110
|
+
// Dequeue second value
|
|
111
|
+
const result2 = yield queue.dequeue();
|
|
112
|
+
expect(result2.value).toBe(2);
|
|
113
|
+
// Now queue is empty, waitUntilEmpty should resolve\
|
|
114
|
+
yield waitPromise;
|
|
115
|
+
}));
|
|
116
|
+
});
|
|
117
|
+
describe("waitClosed functionality", () => {
|
|
118
|
+
it("waitClosed test with unclosed queue", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
119
|
+
const queue = new AsyncQueue_1.AsyncQueue();
|
|
120
|
+
// waitClosed should not resolve since queue is not closed
|
|
121
|
+
const waitPromise = queue.waitClosed();
|
|
122
|
+
queue.enqueue(1);
|
|
123
|
+
const result = yield queue.dequeue();
|
|
124
|
+
expect(result.value).toBe(1);
|
|
125
|
+
// Close the queue
|
|
126
|
+
queue.close();
|
|
127
|
+
// Now queue is closed, waitClosed should resolve
|
|
128
|
+
yield waitPromise;
|
|
129
|
+
}));
|
|
130
|
+
it("waitClosed test with already closed queue", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
131
|
+
const queue = new AsyncQueue_1.AsyncQueue();
|
|
132
|
+
queue.close();
|
|
133
|
+
// waitClosed should resolve immediately since queue is already closed
|
|
134
|
+
yield queue.waitClosed();
|
|
135
|
+
}));
|
|
136
|
+
it("multiple waitClosed calls test", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
137
|
+
const queue = new AsyncQueue_1.AsyncQueue();
|
|
138
|
+
// Create multiple waitClosed promises
|
|
139
|
+
const waitPromises = [queue.waitClosed(), queue.waitClosed(), queue.waitClosed()];
|
|
140
|
+
// Close the queue
|
|
141
|
+
queue.close();
|
|
142
|
+
// All promises should resolve
|
|
143
|
+
yield Promise.all(waitPromises);
|
|
144
|
+
}));
|
|
145
|
+
it("waitClosed test with delayed close", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
146
|
+
const queue = new AsyncQueue_1.AsyncQueue();
|
|
147
|
+
// Start waiting for close
|
|
148
|
+
const closePromise = queue.waitClosed();
|
|
149
|
+
// Close after delay
|
|
150
|
+
setTimeout(() => {
|
|
151
|
+
queue.close();
|
|
152
|
+
}, 10);
|
|
153
|
+
yield closePromise; // Should resolve when queue is closed
|
|
154
|
+
}));
|
|
155
|
+
});
|
|
156
|
+
describe("dequeue behavior", () => {
|
|
157
|
+
it("dequeue before enqueue test", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
158
|
+
const queue = new AsyncQueue_1.AsyncQueue();
|
|
159
|
+
// Start dequeue before enqueue
|
|
160
|
+
const dequeuePromise = queue.dequeue();
|
|
161
|
+
// Enqueue after a small delay
|
|
162
|
+
setTimeout(() => {
|
|
163
|
+
queue.enqueue(42);
|
|
164
|
+
}, 10);
|
|
165
|
+
const result = yield dequeuePromise;
|
|
166
|
+
expect(result.value).toBe(42);
|
|
167
|
+
expect(result.done).toBe(false);
|
|
168
|
+
}));
|
|
169
|
+
it("multiple dequeue calls test", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
170
|
+
var _a, _b, _c, _d, _e, _f;
|
|
171
|
+
const queue = new AsyncQueue_1.AsyncQueue();
|
|
172
|
+
// Start multiple dequeue calls
|
|
173
|
+
const dequeuePromises = [
|
|
174
|
+
queue.dequeue(),
|
|
175
|
+
queue.dequeue(),
|
|
176
|
+
queue.dequeue(),
|
|
177
|
+
];
|
|
178
|
+
// Enqueue values
|
|
179
|
+
queue.enqueue(1);
|
|
180
|
+
queue.enqueue(2);
|
|
181
|
+
queue.enqueue(3);
|
|
182
|
+
const results = yield Promise.all(dequeuePromises);
|
|
183
|
+
expect((_a = results[0]) === null || _a === void 0 ? void 0 : _a.value).toBe(1);
|
|
184
|
+
expect((_b = results[0]) === null || _b === void 0 ? void 0 : _b.done).toBe(false);
|
|
185
|
+
expect((_c = results[1]) === null || _c === void 0 ? void 0 : _c.value).toBe(2);
|
|
186
|
+
expect((_d = results[1]) === null || _d === void 0 ? void 0 : _d.done).toBe(false);
|
|
187
|
+
expect((_e = results[2]) === null || _e === void 0 ? void 0 : _e.value).toBe(3);
|
|
188
|
+
expect((_f = results[2]) === null || _f === void 0 ? void 0 : _f.done).toBe(false);
|
|
189
|
+
}));
|
|
190
|
+
it("dequeue after close test", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
191
|
+
const queue = new AsyncQueue_1.AsyncQueue();
|
|
192
|
+
queue.enqueue(1);
|
|
193
|
+
queue.close();
|
|
194
|
+
const result1 = yield queue.dequeue();
|
|
195
|
+
expect(result1.value).toBe(1);
|
|
196
|
+
expect(result1.done).toBe(false);
|
|
197
|
+
const result2 = yield queue.dequeue();
|
|
198
|
+
expect(result2.done).toBe(true);
|
|
199
|
+
expect(result2.value).toBeUndefined();
|
|
200
|
+
}));
|
|
201
|
+
it("duplicate dequeue test", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
202
|
+
const queue = new AsyncQueue_1.AsyncQueue();
|
|
203
|
+
// Start dequeue operation that will wait for an item
|
|
204
|
+
const pendingDequeue = queue.dequeue();
|
|
205
|
+
// Add item after a small delay
|
|
206
|
+
setTimeout(() => {
|
|
207
|
+
queue.enqueue("delayed item");
|
|
208
|
+
}, 10);
|
|
209
|
+
const delayedResult = yield pendingDequeue;
|
|
210
|
+
expect(delayedResult.value).toBe("delayed item");
|
|
211
|
+
expect(delayedResult.done).toBe(false);
|
|
212
|
+
// Check for duplicate dequeue
|
|
213
|
+
const duplicatedResult = yield Promise.race([
|
|
214
|
+
queue.dequeue(),
|
|
215
|
+
new Promise(resolve => setTimeout(resolve, 0, false)),
|
|
216
|
+
]);
|
|
217
|
+
// If duplicatedResult is false, it means the race timed out (expected)
|
|
218
|
+
// If it's an IteratorResult, it should not have the same value
|
|
219
|
+
if (duplicatedResult !== false) {
|
|
220
|
+
expect(duplicatedResult.value).not.toBe("delayed item");
|
|
221
|
+
}
|
|
222
|
+
}));
|
|
223
|
+
});
|
|
224
|
+
describe("edge cases and error handling", () => {
|
|
225
|
+
it("enqueue after close test", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
226
|
+
const queue = new AsyncQueue_1.AsyncQueue();
|
|
227
|
+
queue.close();
|
|
228
|
+
queue.enqueue(1); // Should still work, but dequeue will return done: true
|
|
229
|
+
const result = yield queue.dequeue();
|
|
230
|
+
expect(result.done).toBe(true);
|
|
231
|
+
expect(result.value).toBeUndefined();
|
|
232
|
+
}));
|
|
233
|
+
it("multiple close calls test", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
234
|
+
const queue = new AsyncQueue_1.AsyncQueue();
|
|
235
|
+
queue.close();
|
|
236
|
+
queue.close(); // Second close should not cause issues
|
|
237
|
+
const result = yield queue.dequeue();
|
|
238
|
+
expect(result.done).toBe(true);
|
|
239
|
+
expect(result.value).toBeUndefined();
|
|
240
|
+
}));
|
|
241
|
+
it("waitUntilEmpty with multiple calls test", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
242
|
+
const queue = new AsyncQueue_1.AsyncQueue();
|
|
243
|
+
queue.enqueue(1);
|
|
244
|
+
// Create multiple waitUntilEmpty promises
|
|
245
|
+
const waitPromises = [queue.waitUntilEmpty(), queue.waitUntilEmpty()];
|
|
246
|
+
// Dequeue the value
|
|
247
|
+
yield queue.dequeue();
|
|
248
|
+
// All promises should resolve
|
|
249
|
+
yield Promise.all(waitPromises);
|
|
250
|
+
}));
|
|
251
|
+
it("concurrent enqueue and dequeue test", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
252
|
+
const queue = new AsyncQueue_1.AsyncQueue();
|
|
253
|
+
const results = [];
|
|
254
|
+
// Start multiple dequeue operations
|
|
255
|
+
const dequeuePromises = Array.from({ length: 5 }).fill(0).map(() => __awaiter(void 0, void 0, void 0, function* () { return queue.dequeue(); }));
|
|
256
|
+
// Enqueue values with small delays
|
|
257
|
+
for (let i = 0; i < 5; i++) {
|
|
258
|
+
setTimeout(() => {
|
|
259
|
+
queue.enqueue(i);
|
|
260
|
+
}, i * 10);
|
|
261
|
+
}
|
|
262
|
+
// Wait for all dequeue operations to complete
|
|
263
|
+
const dequeuedResults = yield Promise.all(dequeuePromises);
|
|
264
|
+
// Collect values
|
|
265
|
+
dequeuedResults.forEach((result) => {
|
|
266
|
+
if (result.value !== undefined) {
|
|
267
|
+
results.push(result.value);
|
|
268
|
+
}
|
|
269
|
+
});
|
|
270
|
+
// Check that all values were dequeued
|
|
271
|
+
expect(results.length).toBe(5);
|
|
272
|
+
expect(results).toContain(0);
|
|
273
|
+
expect(results).toContain(1);
|
|
274
|
+
expect(results).toContain(2);
|
|
275
|
+
expect(results).toContain(3);
|
|
276
|
+
expect(results).toContain(4);
|
|
277
|
+
}));
|
|
278
|
+
});
|
|
279
|
+
});
|
|
280
|
+
//# sourceMappingURL=AsyncQueue.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AsyncQueue.spec.js","sourceRoot":"","sources":["../../src/utils/AsyncQueue.spec.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,6CAA0C;AAE1C,QAAQ,CAAC,gBAAgB,EAAE,GAAG,EAAE;IAC9B,QAAQ,CAAC,qBAAqB,EAAE,GAAG,EAAE;QACnC,EAAE,CAAC,0BAA0B,EAAE,GAAS,EAAE;YACxC,MAAM,KAAK,GAAG,IAAI,uBAAU,EAAU,CAAC;YAEvC,gBAAgB;YAChB,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;YACjB,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;YACjB,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;YAEjB,gBAAgB;YAChB,MAAM,OAAO,GAAG,MAAM,KAAK,CAAC,OAAO,EAAE,CAAC;YACtC,MAAM,OAAO,GAAG,MAAM,KAAK,CAAC,OAAO,EAAE,CAAC;YACtC,MAAM,OAAO,GAAG,MAAM,KAAK,CAAC,OAAO,EAAE,CAAC;YAEtC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAC9B,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACjC,MAAM,CAAC,O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