@agentica/core 0.12.20 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (205) hide show
  1. package/README.md +50 -47
  2. package/lib/Agentica.d.ts +9 -9
  3. package/lib/Agentica.js +23 -16
  4. package/lib/Agentica.js.map +1 -1
  5. package/lib/chatgpt/ChatGptAgent.d.ts +7 -7
  6. package/lib/chatgpt/ChatGptAgent.js +17 -12
  7. package/lib/chatgpt/ChatGptAgent.js.map +1 -1
  8. package/lib/chatgpt/ChatGptCallFunctionAgent.d.ts +7 -6
  9. package/lib/chatgpt/ChatGptCallFunctionAgent.js +121 -81
  10. package/lib/chatgpt/ChatGptCallFunctionAgent.js.map +1 -1
  11. package/lib/chatgpt/ChatGptCancelFunctionAgent.d.ts +9 -7
  12. package/lib/chatgpt/ChatGptCancelFunctionAgent.js +177 -145
  13. package/lib/chatgpt/ChatGptCancelFunctionAgent.js.map +1 -1
  14. package/lib/chatgpt/ChatGptCompletionMessageUtil.d.ts +13 -8
  15. package/lib/chatgpt/ChatGptCompletionMessageUtil.js +499 -489
  16. package/lib/chatgpt/ChatGptCompletionMessageUtil.js.map +1 -1
  17. package/lib/chatgpt/ChatGptDescribeFunctionAgent.d.ts +7 -6
  18. package/lib/chatgpt/ChatGptDescribeFunctionAgent.js +33 -32
  19. package/lib/chatgpt/ChatGptDescribeFunctionAgent.js.map +1 -1
  20. package/lib/chatgpt/ChatGptHistoryDecoder.d.ts +7 -6
  21. package/lib/chatgpt/ChatGptHistoryDecoder.js +60 -56
  22. package/lib/chatgpt/ChatGptHistoryDecoder.js.map +1 -1
  23. package/lib/chatgpt/ChatGptInitializeFunctionAgent.d.ts +7 -6
  24. package/lib/chatgpt/ChatGptInitializeFunctionAgent.js +121 -116
  25. package/lib/chatgpt/ChatGptInitializeFunctionAgent.js.map +1 -1
  26. package/lib/chatgpt/ChatGptSelectFunctionAgent.d.ts +20 -5
  27. package/lib/chatgpt/ChatGptSelectFunctionAgent.js +183 -150
  28. package/lib/chatgpt/ChatGptSelectFunctionAgent.js.map +1 -1
  29. package/lib/chatgpt/ChatGptUsageAggregator.d.ts +9 -6
  30. package/lib/chatgpt/ChatGptUsageAggregator.js +46 -41
  31. package/lib/chatgpt/ChatGptUsageAggregator.js.map +1 -1
  32. package/lib/context/AgenticaCancelPrompt.d.ts +3 -3
  33. package/lib/context/AgenticaCancelPrompt.js +1 -1
  34. package/lib/context/AgenticaCancelPrompt.js.map +1 -1
  35. package/lib/context/AgenticaClassOperation.d.ts +1 -1
  36. package/lib/context/AgenticaClassOperation.js.map +1 -1
  37. package/lib/context/AgenticaContext.d.ts +9 -9
  38. package/lib/context/AgenticaHttpOperation.d.ts +1 -1
  39. package/lib/context/AgenticaHttpOperation.js.map +1 -1
  40. package/lib/context/AgenticaOperation.d.ts +4 -4
  41. package/lib/context/AgenticaOperationBase.d.ts +1 -1
  42. package/lib/context/AgenticaOperationCollection.d.ts +2 -2
  43. package/lib/context/AgenticaOperationSelection.d.ts +3 -3
  44. package/lib/context/AgenticaTokenUsage.d.ts +1 -1
  45. package/lib/context/AgenticaTokenUsage.js.map +1 -1
  46. package/lib/context/internal/AgenticaTokenUsageAggregator.d.ts +11 -10
  47. package/lib/context/internal/AgenticaTokenUsageAggregator.js +42 -43
  48. package/lib/context/internal/AgenticaTokenUsageAggregator.js.map +1 -1
  49. package/lib/context/internal/__IChatCancelFunctionsApplication.d.ts +2 -2
  50. package/lib/context/internal/__IChatInitialApplication.d.ts +2 -2
  51. package/lib/context/internal/__IChatSelectFunctionsApplication.d.ts +2 -2
  52. package/lib/events/AgenticaCallEvent.d.ts +3 -3
  53. package/lib/events/AgenticaCancelEvent.d.ts +3 -3
  54. package/lib/events/AgenticaDescribeEvent.d.ts +3 -3
  55. package/lib/events/AgenticaDescribeEvent.js +13 -2
  56. package/lib/events/AgenticaDescribeEvent.js.map +1 -1
  57. package/lib/events/AgenticaEvent.d.ts +12 -12
  58. package/lib/events/AgenticaExecuteEvent.d.ts +7 -7
  59. package/lib/events/AgenticaInitializeEvent.d.ts +1 -1
  60. package/lib/events/AgenticaRequestEvent.d.ts +3 -3
  61. package/lib/events/AgenticaRequestEvent.js.map +1 -1
  62. package/lib/events/AgenticaResponseEvent.d.ts +2 -2
  63. package/lib/events/AgenticaResponseEvent.js.map +1 -1
  64. package/lib/events/AgenticaSelectEvent.d.ts +3 -3
  65. package/lib/events/AgenticaSelectEvent.js.map +1 -1
  66. package/lib/events/AgenticaTextEvent.d.ts +1 -1
  67. package/lib/events/AgenticaTextEvent.js +12 -1
  68. package/lib/events/AgenticaTextEvent.js.map +1 -1
  69. package/lib/functional/assertHttpLlmApplication.d.ts +4 -3
  70. package/lib/functional/assertHttpLlmApplication.js +9339 -9338
  71. package/lib/functional/assertHttpLlmApplication.js.map +1 -1
  72. package/lib/functional/validateHttpLlmApplication.d.ts +5 -4
  73. package/lib/functional/validateHttpLlmApplication.js +19 -19
  74. package/lib/functional/validateHttpLlmApplication.js.map +1 -1
  75. package/lib/index.d.ts +19 -19
  76. package/lib/index.js +21 -21
  77. package/lib/index.js.map +1 -1
  78. package/lib/index.mjs +19211 -18997
  79. package/lib/index.mjs.map +1 -1
  80. package/lib/internal/AgenticaDefaultPrompt.d.ts +6 -5
  81. package/lib/internal/AgenticaDefaultPrompt.js +39 -19
  82. package/lib/internal/AgenticaDefaultPrompt.js.map +1 -1
  83. package/lib/internal/AgenticaOperationComposer.d.ts +11 -10
  84. package/lib/internal/AgenticaOperationComposer.js +60 -59
  85. package/lib/internal/AgenticaOperationComposer.js.map +1 -1
  86. package/lib/internal/AgenticaSystemPrompt.d.ts +8 -8
  87. package/lib/internal/AgenticaSystemPrompt.js +9 -9
  88. package/lib/internal/AgenticaSystemPrompt.js.map +1 -1
  89. package/lib/internal/AsyncQueue.d.ts +15 -0
  90. package/lib/internal/AsyncQueue.js +82 -0
  91. package/lib/internal/AsyncQueue.js.map +1 -0
  92. package/lib/internal/ByteArrayUtil.d.ts +1 -1
  93. package/lib/internal/ByteArrayUtil.js +3 -2
  94. package/lib/internal/ByteArrayUtil.js.map +1 -1
  95. package/lib/internal/MPSC.d.ts +10 -0
  96. package/lib/internal/MPSC.js +49 -0
  97. package/lib/internal/MPSC.js.map +1 -0
  98. package/lib/internal/Singleton.js +6 -5
  99. package/lib/internal/Singleton.js.map +1 -1
  100. package/lib/internal/StreamUtil.d.ts +16 -6
  101. package/lib/internal/StreamUtil.js +43 -29
  102. package/lib/internal/StreamUtil.js.map +1 -1
  103. package/lib/internal/__map_take.js +5 -5
  104. package/lib/internal/__map_take.js.map +1 -1
  105. package/lib/json/IAgenticaEventJson.d.ts +7 -7
  106. package/lib/json/IAgenticaOperationSelectionJson.d.ts +1 -1
  107. package/lib/json/IAgenticaPromptJson.d.ts +2 -2
  108. package/lib/prompts/AgenticaCancelPrompt.d.ts +3 -3
  109. package/lib/prompts/AgenticaCancelPrompt.js +1 -1
  110. package/lib/prompts/AgenticaCancelPrompt.js.map +1 -1
  111. package/lib/prompts/AgenticaDescribePrompt.d.ts +3 -3
  112. package/lib/prompts/AgenticaDescribePrompt.js +1 -1
  113. package/lib/prompts/AgenticaDescribePrompt.js.map +1 -1
  114. package/lib/prompts/AgenticaExecutePrompt.d.ts +5 -5
  115. package/lib/prompts/AgenticaExecutePrompt.js.map +1 -1
  116. package/lib/prompts/AgenticaPrompt.d.ts +6 -6
  117. package/lib/prompts/AgenticaSelectPrompt.d.ts +3 -3
  118. package/lib/prompts/AgenticaSelectPrompt.js +1 -1
  119. package/lib/prompts/AgenticaSelectPrompt.js.map +1 -1
  120. package/lib/prompts/AgenticaTextPrompt.d.ts +1 -1
  121. package/lib/structures/IAgenticaConfig.d.ts +5 -5
  122. package/lib/structures/IAgenticaController.d.ts +1 -1
  123. package/lib/structures/IAgenticaExecutor.d.ts +4 -4
  124. package/lib/structures/IAgenticaProps.d.ts +5 -5
  125. package/lib/structures/IAgenticaSystemPrompt.d.ts +4 -4
  126. package/lib/structures/IAgenticaVendor.d.ts +1 -1
  127. package/lib/transformers/AgenticaEventTransformer.d.ts +55 -37
  128. package/lib/transformers/AgenticaEventTransformer.js +105 -58
  129. package/lib/transformers/AgenticaEventTransformer.js.map +1 -1
  130. package/lib/transformers/AgenticaPromptTransformer.d.ts +35 -29
  131. package/lib/transformers/AgenticaPromptTransformer.js +74 -45
  132. package/lib/transformers/AgenticaPromptTransformer.js.map +1 -1
  133. package/package.json +20 -23
  134. package/prompts/cancel.md +1 -1
  135. package/prompts/common.md +1 -1
  136. package/prompts/describe.md +1 -1
  137. package/prompts/execute.md +1 -1
  138. package/prompts/initialize.md +1 -1
  139. package/prompts/select.md +1 -1
  140. package/src/Agentica.ts +41 -31
  141. package/src/chatgpt/ChatGptAgent.ts +63 -57
  142. package/src/chatgpt/ChatGptCallFunctionAgent.ts +363 -337
  143. package/src/chatgpt/ChatGptCancelFunctionAgent.ts +188 -164
  144. package/src/chatgpt/ChatGptCompletionMessageUtil.ts +136 -137
  145. package/src/chatgpt/ChatGptDescribeFunctionAgent.ts +105 -101
  146. package/src/chatgpt/ChatGptHistoryDecoder.ts +69 -65
  147. package/src/chatgpt/ChatGptInitializeFunctionAgent.ts +128 -123
  148. package/src/chatgpt/ChatGptSelectFunctionAgent.ts +215 -189
  149. package/src/chatgpt/ChatGptUsageAggregator.ts +49 -54
  150. package/src/context/AgenticaCancelPrompt.ts +4 -4
  151. package/src/context/AgenticaClassOperation.ts +5 -5
  152. package/src/context/AgenticaContext.ts +15 -15
  153. package/src/context/AgenticaHttpOperation.ts +5 -5
  154. package/src/context/AgenticaOperation.ts +4 -4
  155. package/src/context/AgenticaOperationBase.ts +1 -1
  156. package/src/context/AgenticaOperationCollection.ts +2 -2
  157. package/src/context/AgenticaOperationSelection.ts +3 -3
  158. package/src/context/AgenticaTokenUsage.ts +4 -3
  159. package/src/context/internal/AgenticaTokenUsageAggregator.ts +59 -59
  160. package/src/context/internal/__IChatCancelFunctionsApplication.ts +2 -2
  161. package/src/context/internal/__IChatInitialApplication.ts +2 -2
  162. package/src/context/internal/__IChatSelectFunctionsApplication.ts +2 -2
  163. package/src/events/AgenticaCallEvent.ts +3 -3
  164. package/src/events/AgenticaCancelEvent.ts +3 -3
  165. package/src/events/AgenticaDescribeEvent.ts +5 -5
  166. package/src/events/AgenticaEvent.ts +12 -12
  167. package/src/events/AgenticaExecuteEvent.ts +7 -7
  168. package/src/events/AgenticaInitializeEvent.ts +1 -1
  169. package/src/events/AgenticaRequestEvent.ts +3 -3
  170. package/src/events/AgenticaResponseEvent.ts +2 -2
  171. package/src/events/AgenticaSelectEvent.ts +4 -4
  172. package/src/events/AgenticaTextEvent.ts +2 -2
  173. package/src/functional/assertHttpLlmApplication.ts +9 -6
  174. package/src/functional/validateHttpLlmApplication.ts +14 -8
  175. package/src/index.ts +24 -24
  176. package/src/internal/AgenticaDefaultPrompt.ts +42 -28
  177. package/src/internal/AgenticaOperationComposer.ts +63 -61
  178. package/src/internal/AgenticaSystemPrompt.ts +15 -14
  179. package/src/internal/AsyncQueue.ts +67 -0
  180. package/src/internal/ByteArrayUtil.ts +2 -2
  181. package/src/internal/MPSC.ts +40 -0
  182. package/src/internal/Singleton.ts +8 -6
  183. package/src/internal/StreamUtil.ts +62 -53
  184. package/src/internal/__map_take.ts +5 -7
  185. package/src/json/IAgenticaEventJson.ts +7 -8
  186. package/src/json/IAgenticaOperationSelectionJson.ts +1 -1
  187. package/src/json/IAgenticaPromptJson.ts +2 -2
  188. package/src/prompts/AgenticaCancelPrompt.ts +4 -4
  189. package/src/prompts/AgenticaDescribePrompt.ts +4 -4
  190. package/src/prompts/AgenticaExecutePrompt.ts +6 -5
  191. package/src/prompts/AgenticaPrompt.ts +6 -6
  192. package/src/prompts/AgenticaSelectPrompt.ts +4 -4
  193. package/src/prompts/AgenticaTextPrompt.ts +1 -1
  194. package/src/structures/IAgenticaConfig.ts +5 -5
  195. package/src/structures/IAgenticaController.ts +14 -14
  196. package/src/structures/IAgenticaExecutor.ts +4 -4
  197. package/src/structures/IAgenticaProps.ts +5 -5
  198. package/src/structures/IAgenticaSystemPrompt.ts +4 -4
  199. package/src/structures/IAgenticaVendor.ts +1 -1
  200. package/src/transformers/AgenticaEventTransformer.ts +169 -136
  201. package/src/transformers/AgenticaPromptTransformer.ts +125 -103
  202. package/lib/internal/MPSCUtil.d.ts +0 -35
  203. package/lib/internal/MPSCUtil.js +0 -105
  204. package/lib/internal/MPSCUtil.js.map +0 -1
  205. package/src/internal/MPSCUtil.ts +0 -111
@@ -1,70 +1,71 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AgenticaOperationComposer = void 0;
4
+ exports.compose = compose;
4
5
  const __map_take_1 = require("./__map_take");
5
- var AgenticaOperationComposer;
6
- (function (AgenticaOperationComposer) {
7
- AgenticaOperationComposer.compose = (props) => {
8
- var _a;
9
- const unique = props.controllers.length === 1 ||
10
- (() => {
11
- const names = props.controllers
12
- .map((controller) => controller.application.functions.map((func) => func.name))
13
- .flat();
14
- return new Set(names).size === names.length;
15
- })();
16
- const naming = (func, ci) => unique ? func : `_${ci}_${func}`;
17
- const array = props.controllers
18
- .map((controller, ci) => controller.protocol === "http"
19
- ? controller.application.functions.map((func) => ({
6
+ function compose(props) {
7
+ var _a;
8
+ const unique = props.controllers.length === 1
9
+ || (() => {
10
+ const names = props.controllers
11
+ .map(controller => controller.application.functions.map(func => func.name))
12
+ .flat();
13
+ return new Set(names).size === names.length;
14
+ })();
15
+ const naming = (func, ci) => unique ? func : `_${ci}_${func}`;
16
+ const array = props.controllers
17
+ .map((controller, ci) => controller.protocol === "http"
18
+ ? controller.application.functions.map(func => ({
19
+ protocol: "http",
20
+ controller,
21
+ function: func,
22
+ name: naming(func.name, ci),
23
+ toJSON: () => ({
20
24
  protocol: "http",
21
- controller: controller,
22
- function: func,
25
+ controller: controller.name,
26
+ function: func.name,
23
27
  name: naming(func.name, ci),
24
- toJSON: () => ({
25
- protocol: "http",
26
- controller: controller.name,
27
- function: func.name,
28
- name: naming(func.name, ci),
29
- }),
30
- }))
31
- : controller.application.functions.map((func) => ({
28
+ }),
29
+ }))
30
+ : controller.application.functions.map(func => ({
31
+ protocol: "class",
32
+ controller,
33
+ function: func,
34
+ name: naming(func.name, ci),
35
+ toJSON: () => ({
32
36
  protocol: "class",
33
- controller,
34
- function: func,
37
+ controller: controller.name,
38
+ function: func.name,
35
39
  name: naming(func.name, ci),
36
- toJSON: () => ({
37
- protocol: "class",
38
- controller: controller.name,
39
- function: func.name,
40
- name: naming(func.name, ci),
41
- }),
42
- })))
43
- .flat();
44
- const divided = !!((_a = props.config) === null || _a === void 0 ? void 0 : _a.capacity) && array.length > props.config.capacity
45
- ? divideOperations({
46
- array,
47
- capacity: props.config.capacity,
48
- })
49
- : undefined;
50
- const flat = new Map();
51
- const group = new Map();
52
- for (const item of array) {
53
- flat.set(item.name, item);
54
- (0, __map_take_1.__map_take)(group, item.controller.name, () => new Map()).set(item.name, item);
55
- }
56
- return {
40
+ }),
41
+ })))
42
+ .flat();
43
+ const divided = ((_a = props.config) === null || _a === void 0 ? void 0 : _a.capacity) !== undefined && array.length > props.config.capacity
44
+ ? divide({
57
45
  array,
58
- divided,
59
- flat,
60
- group,
61
- };
46
+ capacity: props.config.capacity,
47
+ })
48
+ : undefined;
49
+ const flat = new Map();
50
+ const group = new Map();
51
+ for (const item of array) {
52
+ flat.set(item.name, item);
53
+ (0, __map_take_1.__map_take)(group, item.controller.name, () => new Map()).set(item.name, item);
54
+ }
55
+ return {
56
+ array,
57
+ divided,
58
+ flat,
59
+ group,
62
60
  };
63
- const divideOperations = (props) => {
64
- const size = Math.ceil(props.array.length / props.capacity);
65
- const capacity = Math.ceil(props.array.length / size);
66
- const replica = props.array.slice();
67
- return new Array(size).fill(0).map(() => replica.splice(0, capacity));
68
- };
69
- })(AgenticaOperationComposer || (exports.AgenticaOperationComposer = AgenticaOperationComposer = {}));
61
+ }
62
+ function divide(props) {
63
+ const size = Math.ceil(props.array.length / props.capacity);
64
+ const capacity = Math.ceil(props.array.length / size);
65
+ const replica = props.array.slice();
66
+ return Array.from({ length: size }, () => replica.splice(0, capacity));
67
+ }
68
+ exports.AgenticaOperationComposer = {
69
+ compose,
70
+ };
70
71
  //# sourceMappingURL=AgenticaOperationComposer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AgenticaOperationComposer.js","sourceRoot":"","sources":["../../src/internal/AgenticaOperationComposer.ts"],"names":[],"mappings":";;;AAMA,6CAA0C;AAE1C,IAAiB,yBAAyB,CAuFzC;AAvFD,WAAiB,yBAAyB;IAC3B,iCAAO,GAAG,CAAiC,KAGvD,EAAsC,EAAE;;QACvC,MAAM,MAAM,GACV,KAAK,CAAC,WAAW,CAAC,MAAM,KAAK,CAAC;YAC9B,CAAC,GAAG,EAAE;gBACJ,MAAM,KAAK,GAAa,KAAK,CAAC,WAAW;qBACtC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAClB,UAAU,CAAC,WAAW,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAC1D;qBACA,IAAI,EAAE,CAAC;gBACV,OAAO,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,IAAI,KAAK,KAAK,CAAC,MAAM,CAAC;YAC9C,CAAC,CAAC,EAAE,CAAC;QACP,MAAM,MAAM,GAAG,CAAC,IAAY,EAAE,EAAU,EAAE,EAAE,CAC1C,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC;QAEnC,MAAM,KAAK,GAA+B,KAAK,CAAC,WAAW;aACxD,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,EAAE,EAAE,CACtB,UAAU,CAAC,QAAQ,KAAK,MAAM;YAC5B,CAAC,CAAC,UAAU,CAAC,WAAW,CAAC,SAAS,CAAC,GAAG,CAClC,CAAC,IAAI,EAAE,EAAE,CACP,CAAC;gBACC,QAAQ,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AM,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC;IACpE,MAAM,QAAQ,GAAW,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC9D,MAAM,OAAO,GAAQ,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;IACzC,OAAO,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC;AACzE,CAAC;AAEY,QAAA,yBAAyB,GAAG;IACvC,OAAO;CACR,CAAC"}
@@ -1,8 +1,8 @@
1
- export declare namespace AgenticaSystemPrompt {
2
- const CANCEL = "You are a helpful assistant for cancelling functions which are prepared to call.\n\nUse the supplied tools to select some functions to cancel of `getApiFunctions()` returned.\n\nIf you can't find any proper function to select, don't talk, don't do anything.";
3
- const COMMON = "At first, the user's language locale code is \"${locale}\". When you are conversating with the user or describing the function calling result, consider it and always translate to the target locale language. Never conversate with different locale language text with the user.\n\nAt second, the user's timezone is \"${timezone}\", and ISO datetime is ${datetime}. When you are conversating with the user, consider current time and user belonged timezone.";
4
- const DESCRIBE = "You are a helpful assistant describing return values of function calls.\n\nAbove messages are the list of function call histories. When describing the return values, please do not too much shortly summarize them. Instead, provide detailed descriptions as much as.\n\nAlso, its content format must be markdown. If required, utilize the mermaid syntax for drawing some diagrams. When image contents are, just put them through the markdown image syntax.\n\nAt last, if user's language locale code is different with your description, please translate it to the user's language.";
5
- const EXECUTE = "You are a helpful assistant for tool calling.\n\nUse the supplied tools to assist the user.\n\nIf previous messages are not enough to compose the arguments, you can ask the user to write more information. By the way, when asking the user to write more information, make the text concise and clear.\n\nFor reference, in the \"tool\" role message content, the `function` property means metadata of the API operation. In other words, it is the function schema describing its purpose, parameters and return value types. And then the `data` property is the return value from the target function calling.";
6
- const INITIALIZE = "You are a helpful assistant.\n\nUse the supplied tools to assist the user.";
7
- const SELECT = "You are a helpful assistant for selecting functions to call.\n\nUse the supplied tools to select some functions of `getApiFunctions()` returned.\n\nWhen selecting functions to call, pay attention to the relationship between functions. In particular, check the prerequisites between each function.\n\nIf you can't find any proper function to select, just type your own message. By the way, when typing your own message, please consider the user's language locale code. If your message is different with the user's language, please translate it to the user's.";
8
- }
1
+ export declare const AgenticaSystemPrompt: {
2
+ CANCEL: string;
3
+ COMMON: string;
4
+ DESCRIBE: string;
5
+ EXECUTE: string;
6
+ INITIALIZE: string;
7
+ SELECT: string;
8
+ };
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AgenticaSystemPrompt = void 0;
4
- var AgenticaSystemPrompt;
5
- (function (AgenticaSystemPrompt) {
6
- AgenticaSystemPrompt.CANCEL = "You are a helpful assistant for cancelling functions which are prepared to call.\n\nUse the supplied tools to select some functions to cancel of `getApiFunctions()` returned.\n\nIf you can't find any proper function to select, don't talk, don't do anything.";
7
- AgenticaSystemPrompt.COMMON = "At first, the user's language locale code is \"${locale}\". When you are conversating with the user or describing the function calling result, consider it and always translate to the target locale language. Never conversate with different locale language text with the user.\n\nAt second, the user's timezone is \"${timezone}\", and ISO datetime is ${datetime}. When you are conversating with the user, consider current time and user belonged timezone.";
8
- AgenticaSystemPrompt.DESCRIBE = "You are a helpful assistant describing return values of function calls.\n\nAbove messages are the list of function call histories. When describing the return values, please do not too much shortly summarize them. Instead, provide detailed descriptions as much as.\n\nAlso, its content format must be markdown. If required, utilize the mermaid syntax for drawing some diagrams. When image contents are, just put them through the markdown image syntax.\n\nAt last, if user's language locale code is different with your description, please translate it to the user's language.";
9
- AgenticaSystemPrompt.EXECUTE = "You are a helpful assistant for tool calling.\n\nUse the supplied tools to assist the user.\n\nIf previous messages are not enough to compose the arguments, you can ask the user to write more information. By the way, when asking the user to write more information, make the text concise and clear.\n\nFor reference, in the \"tool\" role message content, the `function` property means metadata of the API operation. In other words, it is the function schema describing its purpose, parameters and return value types. And then the `data` property is the return value from the target function calling.";
10
- AgenticaSystemPrompt.INITIALIZE = "You are a helpful assistant.\n\nUse the supplied tools to assist the user.";
11
- AgenticaSystemPrompt.SELECT = "You are a helpful assistant for selecting functions to call.\n\nUse the supplied tools to select some functions of `getApiFunctions()` returned.\n\nWhen selecting functions to call, pay attention to the relationship between functions. In particular, check the prerequisites between each function.\n\nIf you can't find any proper function to select, just type your own message. By the way, when typing your own message, please consider the user's language locale code. If your message is different with the user's language, please translate it to the user's.";
12
- })(AgenticaSystemPrompt || (exports.AgenticaSystemPrompt = AgenticaSystemPrompt = {}));
4
+ /* eslint-disable no-template-curly-in-string */
5
+ exports.AgenticaSystemPrompt = {
6
+ CANCEL: "You are a helpful assistant for cancelling functions which are prepared to call.\n\nUse the supplied tools to select some functions to cancel of `getApiFunctions()` returned.\n\nIf you can't find any proper function to select, don't talk, don't do anything.",
7
+ COMMON: "At first, the user's language locale code is \"${locale}\". When you are conversating with the user or describing the function calling result, consider it and always translate to the target locale language. Never conversate with different locale language text with the user.\n\nAt second, the user's timezone is \"${timezone}\", and ISO datetime is ${datetime}. When you are conversating with the user, consider current time and user belonged timezone.",
8
+ DESCRIBE: "You are a helpful assistant describing return values of function calls.\n\nAbove messages are the list of function call histories. When describing the return values, please do not too much shortly summarize them. Instead, provide detailed descriptions as much as.\n\nAlso, its content format must be markdown. If required, utilize the mermaid syntax for drawing some diagrams. When image contents are, just put them through the markdown image syntax.\n\nAt last, if user's language locale code is different with your description, please translate it to the user's language.",
9
+ EXECUTE: "You are a helpful assistant for tool calling.\n\nUse the supplied tools to assist the user.\n\nIf previous messages are not enough to compose the arguments, you can ask the user to write more information. By the way, when asking the user to write more information, make the text concise and clear.\n\nFor reference, in the \"tool\" role message content, the `function` property means metadata of the API operation. In other words, it is the function schema describing its purpose, parameters and return value types. And then the `data` property is the return value from the target function calling.",
10
+ INITIALIZE: "You are a helpful assistant.\n\nUse the supplied tools to assist the user.",
11
+ SELECT: "You are a helpful assistant for selecting functions to call.\n\nUse the supplied tools to select some functions of `getApiFunctions()` returned.\n\nWhen selecting functions to call, pay attention to the relationship between functions. In particular, check the prerequisites between each function.\n\nIf you can't find any proper function to select, just type your own message. By the way, when typing your own message, please consider the user's language locale code. If your message is different with the user's language, please translate it to the user's.",
12
+ };
13
13
  //# sourceMappingURL=AgenticaSystemPrompt.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AgenticaSystemPrompt.js","sourceRoot":"","sources":["../../src/internal/AgenticaSystemPrompt.ts"],"names":[],"mappings":";;;AAAA,IAAiB,oBAAoB,CAapC;AAbD,WAAiB,oBAAoB;IACtB,2BAAM,GACjB,mQAAmQ,CAAC;IACzP,2BAAM,GACjB,scAAsc,CAAC;IAC5b,6BAAQ,GACnB,+jBAA+jB,CAAC;IACrjB,4BAAO,GAClB,wlBAAwlB,CAAC;IAC9kB,+BAAU,GACrB,4EAA4E,CAAC;IAClE,2BAAM,GACjB,+iBAA+iB,CAAC;AACpjB,CAAC,EAbgB,oBAAoB,oCAApB,oBAAoB,QAapC"}
1
+ {"version":3,"file":"AgenticaSystemPrompt.js","sourceRoot":"","sources":["../../src/internal/AgenticaSystemPrompt.ts"],"names":[],"mappings":";;;AAAA,gDAAgD;AACnC,QAAA,oBAAoB,GAAG;IAClC,MAAM,EACJ,mQAAmQ;IACrQ,MAAM,EACJ,scAAsc;IACxc,QAAQ,EACN,+jBAA+jB;IACjkB,OAAO,EACL,wlBAAwlB;IAC1lB,UAAU,EACR,4EAA4E;IAC9E,MAAM,EACJ,+iBAA+iB;CACljB,CAAC"}
@@ -0,0 +1,15 @@
1
+ export declare class AsyncQueue<T> {
2
+ private queue;
3
+ private resolvers;
4
+ private closeResolvers;
5
+ private emptyResolvers;
6
+ private closed;
7
+ enqueue(item: T): void;
8
+ dequeue(): Promise<IteratorResult<T, undefined>>;
9
+ isEmpty(): boolean;
10
+ isClosed(): boolean;
11
+ done(): boolean;
12
+ close(): void;
13
+ waitUntilEmpty(): Promise<void>;
14
+ waitClosed(): Promise<void>;
15
+ }
@@ -0,0 +1,82 @@
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
+ exports.AsyncQueue = void 0;
13
+ class AsyncQueue {
14
+ constructor() {
15
+ this.queue = [];
16
+ this.resolvers = [];
17
+ this.closeResolvers = [];
18
+ this.emptyResolvers = [];
19
+ this.closed = false;
20
+ }
21
+ enqueue(item) {
22
+ var _a;
23
+ this.queue.push(item);
24
+ if (this.resolvers.length > 0) {
25
+ (_a = this.resolvers.shift()) === null || _a === void 0 ? void 0 : _a({ value: this.queue.shift(), done: false });
26
+ }
27
+ }
28
+ dequeue() {
29
+ return __awaiter(this, void 0, void 0, function* () {
30
+ if (this.queue.length > 0) {
31
+ return { value: this.queue.shift(), done: false };
32
+ }
33
+ if (this.closed) {
34
+ if (this.emptyResolvers.length > 0) {
35
+ this.emptyResolvers.forEach(resolve => resolve());
36
+ this.emptyResolvers = [];
37
+ }
38
+ return { value: undefined, done: true };
39
+ }
40
+ return new Promise(resolve => this.resolvers.push(resolve));
41
+ });
42
+ }
43
+ isEmpty() {
44
+ return this.queue.length === 0;
45
+ }
46
+ isClosed() {
47
+ return this.closed;
48
+ }
49
+ done() {
50
+ return this.isClosed() && this.isEmpty();
51
+ }
52
+ close() {
53
+ var _a;
54
+ this.closed = true;
55
+ while (this.resolvers.length > 0) {
56
+ (_a = this.resolvers.shift()) === null || _a === void 0 ? void 0 : _a({ value: undefined, done: true });
57
+ }
58
+ this.closeResolvers.forEach(resolve => resolve());
59
+ }
60
+ waitUntilEmpty() {
61
+ return __awaiter(this, void 0, void 0, function* () {
62
+ if (this.isEmpty()) {
63
+ return Promise.resolve();
64
+ }
65
+ return new Promise((resolve) => {
66
+ this.emptyResolvers.push(resolve);
67
+ });
68
+ });
69
+ }
70
+ waitClosed() {
71
+ return __awaiter(this, void 0, void 0, function* () {
72
+ if (this.isClosed()) {
73
+ return Promise.resolve();
74
+ }
75
+ return new Promise((resolve) => {
76
+ this.closeResolvers.push(resolve);
77
+ });
78
+ });
79
+ }
80
+ }
81
+ exports.AsyncQueue = AsyncQueue;
82
+ //# sourceMappingURL=AsyncQueue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AsyncQueue.js","sourceRoot":"","sources":["../../src/internal/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;IA6DzB,CAAC;IA3DC,OAAO,CAAC,IAAO;;QACb,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACtB,IAAI,IAAI,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC9B,MAAA,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,0CAAG,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EAAG,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;QACxE,CAAC;IACH,CAAC;IAEK,OAAO;;YACX,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAC1B,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,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CAAC;YAC3B,CAAC;YACD,OAAO,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE;gBACnC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACpC,CAAC,CAAC,CAAC;QACL,CAAC;KAAA;IAEK,UAAU;;YACd,IAAI,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC;gBACpB,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;YAC3B,CAAC;YAED,OAAO,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE;gBACnC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACpC,CAAC,CAAC,CAAC;QACL,CAAC;KAAA;CACF;AAlED,gCAkEC"}
@@ -1,3 +1,3 @@
1
1
  export declare namespace ByteArrayUtil {
2
- const toUtf8: (byteArray: Uint8Array) => string;
2
+ function toUtf8(byteArray: Uint8Array): string;
3
3
  }
@@ -3,8 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ByteArrayUtil = void 0;
4
4
  var ByteArrayUtil;
5
5
  (function (ByteArrayUtil) {
6
- ByteArrayUtil.toUtf8 = (byteArray) => {
6
+ function toUtf8(byteArray) {
7
7
  return new TextDecoder().decode(byteArray);
8
- };
8
+ }
9
+ ByteArrayUtil.toUtf8 = toUtf8;
9
10
  })(ByteArrayUtil || (exports.ByteArrayUtil = ByteArrayUtil = {}));
10
11
  //# sourceMappingURL=ByteArrayUtil.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ByteArrayUtil.js","sourceRoot":"","sources":["../../src/internal/ByteArrayUtil.ts"],"names":[],"mappings":";;;AAAA,IAAiB,aAAa,CAI7B;AAJD,WAAiB,aAAa;IACf,oBAAM,GAAG,CAAC,SAAqB,EAAU,EAAE;QACtD,OAAO,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IAC7C,CAAC,CAAC;AACJ,CAAC,EAJgB,aAAa,6BAAb,aAAa,QAI7B"}
1
+ {"version":3,"file":"ByteArrayUtil.js","sourceRoot":"","sources":["../../src/internal/ByteArrayUtil.ts"],"names":[],"mappings":";;;AAAA,IAAiB,aAAa,CAI7B;AAJD,WAAiB,aAAa;IAC5B,SAAgB,MAAM,CAAC,SAAqB;QAC1C,OAAO,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IAC7C,CAAC;IAFe,oBAAM,SAErB,CAAA;AACH,CAAC,EAJgB,aAAa,6BAAb,aAAa,QAI7B"}
@@ -0,0 +1,10 @@
1
+ export declare class MPSC<T> {
2
+ private readonly queue;
3
+ readonly consumer: ReadableStream<T>;
4
+ constructor();
5
+ produce(chunk: T): void;
6
+ close(): void;
7
+ done(): boolean;
8
+ waitClosed(): Promise<void>;
9
+ waitUntilEmpty(): Promise<void>;
10
+ }
@@ -0,0 +1,49 @@
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
+ exports.MPSC = void 0;
13
+ const AsyncQueue_1 = require("./AsyncQueue");
14
+ class MPSC {
15
+ constructor() {
16
+ this.queue = new AsyncQueue_1.AsyncQueue();
17
+ this.consumer = new ReadableStream({
18
+ pull: (controller) => __awaiter(this, void 0, void 0, function* () {
19
+ const { value, done } = yield this.queue.dequeue();
20
+ if (done === true) {
21
+ controller.close();
22
+ return;
23
+ }
24
+ controller.enqueue(value);
25
+ }),
26
+ });
27
+ }
28
+ produce(chunk) {
29
+ this.queue.enqueue(chunk);
30
+ }
31
+ close() {
32
+ this.queue.close();
33
+ }
34
+ done() {
35
+ return this.queue.done();
36
+ }
37
+ waitClosed() {
38
+ return __awaiter(this, void 0, void 0, function* () {
39
+ yield this.queue.waitClosed();
40
+ });
41
+ }
42
+ waitUntilEmpty() {
43
+ return __awaiter(this, void 0, void 0, function* () {
44
+ yield this.queue.waitUntilEmpty();
45
+ });
46
+ }
47
+ }
48
+ exports.MPSC = MPSC;
49
+ //# sourceMappingURL=MPSC.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MPSC.js","sourceRoot":"","sources":["../../src/internal/MPSC.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA0C;AAE1C,MAAa,IAAI;IAIf;QACE,IAAI,CAAC,KAAK,GAAG,IAAI,uBAAU,EAAK,CAAC;QACjC,IAAI,CAAC,QAAQ,GAAG,IAAI,cAAc,CAAI;YACpC,IAAI,EAAE,CAAO,UAAU,EAAE,EAAE;gBACzB,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;gBACnD,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;oBAClB,UAAU,CAAC,KAAK,EAAE,CAAC;oBACnB,OAAO;gBACT,CAAC;gBACD,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;YAC5B,CAAC,CAAA;SACF,CAAC,CAAC;IACL,CAAC;IAED,OAAO,CAAC,KAAQ;QACd,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAC5B,CAAC;IAED,KAAK;QACH,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;IACrB,CAAC;IAED,IAAI;QACF,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;IAC3B,CAAC;IAEK,UAAU;;YACd,MAAM,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC;QAChC,CAAC;KAAA;IAEK,cAAc;;YAClB,MAAM,IAAI,CAAC,KAAK,CAAC,cAAc,EAAE,CAAC;QACpC,CAAC;KAAA;CACF;AArCD,oBAqCC"}
@@ -1,6 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Singleton = void 0;
4
+ /**
5
+ * @internal
6
+ */
7
+ const NOT_MOUNTED_YET = {};
4
8
  /**
5
9
  * @internal
6
10
  */
@@ -10,14 +14,11 @@ class Singleton {
10
14
  this.value_ = NOT_MOUNTED_YET;
11
15
  }
12
16
  get(...args) {
13
- if (this.value_ === NOT_MOUNTED_YET)
17
+ if (this.value_ === NOT_MOUNTED_YET) {
14
18
  this.value_ = this.closure_(...args);
19
+ }
15
20
  return this.value_;
16
21
  }
17
22
  }
18
23
  exports.Singleton = Singleton;
19
- /**
20
- * @internal
21
- */
22
- const NOT_MOUNTED_YET = {};
23
24
  //# sourceMappingURL=Singleton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Singleton.js","sourceRoot":"","sources":["../../src/internal/Singleton.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,MAAa,SAAS;IAIpB,YAAmB,OAA6B;QAC9C,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,CAAC,MAAM,GAAG,eAAe,CAAC;IAChC,CAAC;IAEM,GAAG,CAAC,GAAG,IAAU;QACtB,IAAI,IAAI,CAAC,MAAM,KAAK,eAAe;YAAE,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,CAAC;QAC1E,OAAO,IAAI,CAAC,MAAW,CAAC;IAC1B,CAAC;CACF;AAbD,8BAaC;AAED;;GAEG;AACH,MAAM,eAAe,GAAG,EAAE,CAAC"}
1
+ {"version":3,"file":"Singleton.js","sourceRoot":"","sources":["../../src/internal/Singleton.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,MAAM,eAAe,GAAG,EAAE,CAAC;AAE3B;;GAEG;AACH,MAAa,SAAS;IAIpB,YAAmB,OAA6B;QAC9C,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,CAAC,MAAM,GAAG,eAAe,CAAC;IAChC,CAAC;IAEM,GAAG,CAAC,GAAG,IAAU;QACtB,IAAI,IAAI,CAAC,MAAM,KAAK,eAAe,EAAE,CAAC;YACpC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,CAAC;QACvC,CAAC;QACD,OAAO,IAAI,CAAC,MAAW,CAAC;IAC1B,CAAC;CACF;AAfD,8BAeC"}
@@ -1,6 +1,16 @@
1
- export declare namespace StreamUtil {
2
- const readAll: <T>(stream: ReadableStream<T>) => Promise<T[]>;
3
- const reduce: <T, R = T>(stream: ReadableStream<T>, reducer: (acc: T | R, cur: T) => R, initial?: R) => Promise<R | null>;
4
- const to: <T>(value: T) => ReadableStream<T>;
5
- const transform: <T, R>(stream: ReadableStream<T>, transformer: (value: T) => R) => ReadableStream<R>;
6
- }
1
+ /**
2
+ * @module StreamUtil
3
+ *
4
+ * Utility functions for streams.
5
+ */
6
+ declare function readAll<T>(stream: ReadableStream<T>): Promise<T[]>;
7
+ declare function reduce<T, R = T>(stream: ReadableStream<T>, reducer: (acc: T | R, cur: T) => R, initial?: R): Promise<R | null>;
8
+ declare function to<T>(value: T): ReadableStream<T>;
9
+ declare function transform<T, R>(stream: ReadableStream<T>, transformer: (value: T) => R): ReadableStream<R>;
10
+ export declare const StreamUtil: {
11
+ readAll: typeof readAll;
12
+ reduce: typeof reduce;
13
+ to: typeof to;
14
+ transform: typeof transform;
15
+ };
16
+ export {};
@@ -10,26 +10,34 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.StreamUtil = void 0;
13
- var StreamUtil;
14
- (function (StreamUtil) {
15
- StreamUtil.readAll = (stream) => __awaiter(this, void 0, void 0, function* () {
13
+ /**
14
+ * @module StreamUtil
15
+ *
16
+ * Utility functions for streams.
17
+ */
18
+ function readAll(stream) {
19
+ return __awaiter(this, void 0, void 0, function* () {
16
20
  const reader = stream.getReader();
17
21
  const result = [];
18
22
  while (true) {
19
23
  const { done, value } = yield reader.read();
20
- if (done)
24
+ if (done) {
21
25
  break;
26
+ }
22
27
  result.push(value);
23
28
  }
24
29
  return result;
25
30
  });
26
- StreamUtil.reduce = (stream, reducer, initial) => __awaiter(this, void 0, void 0, function* () {
31
+ }
32
+ function reduce(stream, reducer, initial) {
33
+ return __awaiter(this, void 0, void 0, function* () {
27
34
  const reader = stream.getReader();
28
35
  let acc = (initial !== null && initial !== void 0 ? initial : null);
29
36
  while (true) {
30
37
  const { done, value } = yield reader.read();
31
- if (done)
38
+ if (done) {
32
39
  break;
40
+ }
33
41
  if (acc === null) {
34
42
  acc = value;
35
43
  continue;
@@ -38,28 +46,34 @@ var StreamUtil;
38
46
  }
39
47
  return acc;
40
48
  });
41
- StreamUtil.to = (value) => {
42
- const stream = new ReadableStream({
43
- start: (controller) => {
44
- controller.enqueue(value);
49
+ }
50
+ function to(value) {
51
+ const stream = new ReadableStream({
52
+ start: (controller) => {
53
+ controller.enqueue(value);
54
+ controller.close();
55
+ },
56
+ });
57
+ return stream;
58
+ }
59
+ function transform(stream, transformer) {
60
+ const reader = stream.getReader();
61
+ return new ReadableStream({
62
+ pull: (controller) => __awaiter(this, void 0, void 0, function* () {
63
+ const { done, value } = yield reader.read();
64
+ if (!done) {
65
+ controller.enqueue(transformer(value));
66
+ }
67
+ else {
45
68
  controller.close();
46
- },
47
- });
48
- return stream;
49
- };
50
- StreamUtil.transform = (stream, transformer) => {
51
- const reader = stream.getReader();
52
- return new ReadableStream({
53
- pull: (controller) => __awaiter(this, void 0, void 0, function* () {
54
- const { done, value } = yield reader.read();
55
- if (!done) {
56
- controller.enqueue(transformer(value));
57
- }
58
- else {
59
- controller.close();
60
- }
61
- }),
62
- });
63
- };
64
- })(StreamUtil || (exports.StreamUtil = StreamUtil = {}));
69
+ }
70
+ }),
71
+ });
72
+ }
73
+ exports.StreamUtil = {
74
+ readAll,
75
+ reduce,
76
+ to,
77
+ transform,
78
+ };
65
79
  //# sourceMappingURL=StreamUtil.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"StreamUtil.js","sourceRoot":"","sources":["../../src/internal/StreamUtil.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,IAAiB,UAAU,CA+D1B;AA/DD,WAAiB,UAAU;IACZ,kBAAO,GAAG,CAAU,MAAyB,EAAgB,EAAE;QAC1E,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;QAClC,MAAM,MAAM,GAAQ,EAAE,CAAC;QACvB,OAAO,IAAI,EAAE,CAAC;YACZ,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;YAC5C,IAAI,IAAI;gBAAE,MAAM;YAChB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACrB,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC,CAAA,CAAC;IAEW,iBAAM,GAAG,CACpB,MAAyB,EACzB,OAAkC,EAClC,OAAW,EACQ,EAAE;QACrB,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;QAElC,IAAI,GAAG,GAAG,CAAC,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,IAAI,CAAiB,CAAC;QAE5C,OAAO,IAAI,EAAE,CAAC;YACZ,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;YAC5C,IAAI,IAAI;gBAAE,MAAM;YAChB,IAAI,GAAG,KAAK,IAAI,EAAE,CAAC;gBACjB,GAAG,GAAG,KAAK,CAAC;gBACZ,SAAS;YACX,CAAC;YAED,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,K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,EAAE,GAAG,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;YAC5C,IAAI,CAAC,IAAI,EAAE,CAAC;gBACV,UAAU,CAAC,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC;YACzC,CAAC;iBACI,CAAC;gBACJ,UAAU,CAAC,KAAK,EAAE,CAAC;YACrB,CAAC;QACH,CAAC,CAAA;KACF,CAAC,CAAC;AACL,CAAC;AAEY,QAAA,UAAU,GAAG;IACxB,OAAO;IACP,MAAM;IACN,EAAE;IACF,SAAS;CACV,CAAC"}
@@ -1,16 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.__map_take = void 0;
3
+ exports.__map_take = __map_take;
4
4
  /**
5
5
  * @internal
6
6
  */
7
- const __map_take = (dict, key, generator) => {
7
+ function __map_take(dict, key, generator) {
8
8
  const oldbie = dict.get(key);
9
- if (oldbie)
9
+ if (oldbie !== undefined) {
10
10
  return oldbie;
11
+ }
11
12
  const value = generator();
12
13
  dict.set(key, value);
13
14
  return value;
14
- };
15
- exports.__map_take = __map_take;
15
+ }
16
16
  //# sourceMappingURL=__map_take.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"__map_take.js","sourceRoot":"","sources":["../../src/internal/__map_take.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACI,MAAM,UAAU,GAAG,CACxB,IAAiB,EACjB,GAAQ,EACR,SAAkB,EACf,EAAE;IACL,MAAM,MAAM,GAAkB,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC5C,IAAI,MAAM;QAAE,OAAO,MAAM,CAAC;IAE1B,MAAM,KAAK,GAAM,SAAS,EAAE,CAAC;IAC7B,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IACrB,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAXW,QAAA,UAAU,cAWrB"}
1
+ {"version":3,"file":"__map_take.js","sourceRoot":"","sources":["../../src/internal/__map_take.ts"],"names":[],"mappings":";;AAGA,gCASC;AAZD;;GAEG;AACH,SAAgB,UAAU,CAAS,IAAiB,EAAE,GAAQ,EAAE,SAAkB;IAChF,MAAM,MAAM,GAAkB,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC5C,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACzB,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,MAAM,KAAK,GAAM,SAAS,EAAE,CAAC;IAC7B,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IACrB,OAAO,KAAK,CAAC;AACf,CAAC"}