@microsoft/agents-hosting-dialogs 0.1.49

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 (325) hide show
  1. package/dist/index.js +20 -0
  2. package/dist/src/agentComponent.d.ts +18 -0
  3. package/dist/src/agentComponent.js +55 -0
  4. package/dist/src/agentComponent.js.map +1 -0
  5. package/dist/src/agentStateSet.d.ts +48 -0
  6. package/dist/src/agentStateSet.js +66 -0
  7. package/dist/src/agentStateSet.js.map +1 -0
  8. package/dist/src/choices/choice.d.ts +14 -0
  9. package/dist/src/choices/choice.js +7 -0
  10. package/dist/src/choices/choice.js.map +1 -0
  11. package/dist/src/choices/choiceFactory.d.ts +81 -0
  12. package/dist/src/choices/choiceFactory.js +133 -0
  13. package/dist/src/choices/choiceFactory.js.map +1 -0
  14. package/dist/src/choices/findChoices.d.ts +28 -0
  15. package/dist/src/choices/findChoices.js +46 -0
  16. package/dist/src/choices/findChoices.js.map +1 -0
  17. package/dist/src/choices/findValues.d.ts +36 -0
  18. package/dist/src/choices/findValues.js +129 -0
  19. package/dist/src/choices/findValues.js.map +1 -0
  20. package/dist/src/choices/index.d.ts +11 -0
  21. package/dist/src/choices/index.js +28 -0
  22. package/dist/src/choices/index.js.map +1 -0
  23. package/dist/src/choices/modelResult.d.ts +11 -0
  24. package/dist/src/choices/modelResult.js +3 -0
  25. package/dist/src/choices/modelResult.js.map +1 -0
  26. package/dist/src/choices/recognizeChoices.d.ts +16 -0
  27. package/dist/src/choices/recognizeChoices.js +81 -0
  28. package/dist/src/choices/recognizeChoices.js.map +1 -0
  29. package/dist/src/choices/tokenizer.d.ts +25 -0
  30. package/dist/src/choices/tokenizer.js +73 -0
  31. package/dist/src/choices/tokenizer.js.map +1 -0
  32. package/dist/src/componentDialog.d.ts +178 -0
  33. package/dist/src/componentDialog.js +252 -0
  34. package/dist/src/componentDialog.js.map +1 -0
  35. package/dist/src/componentRegistration.d.ts +22 -0
  36. package/dist/src/componentRegistration.js +32 -0
  37. package/dist/src/componentRegistration.js.map +1 -0
  38. package/dist/src/configurable.d.ts +22 -0
  39. package/dist/src/configurable.js +60 -0
  40. package/dist/src/configurable.js.map +1 -0
  41. package/dist/src/configuration.d.ts +11 -0
  42. package/dist/src/configuration.js +17 -0
  43. package/dist/src/configuration.js.map +1 -0
  44. package/dist/src/converter.d.ts +13 -0
  45. package/dist/src/converter.js +7 -0
  46. package/dist/src/converter.js.map +1 -0
  47. package/dist/src/dialog.d.ts +184 -0
  48. package/dist/src/dialog.js +201 -0
  49. package/dist/src/dialog.js.map +1 -0
  50. package/dist/src/dialogContainer.d.ts +61 -0
  51. package/dist/src/dialogContainer.js +82 -0
  52. package/dist/src/dialogContainer.js.map +1 -0
  53. package/dist/src/dialogContext.d.ts +272 -0
  54. package/dist/src/dialogContext.js +444 -0
  55. package/dist/src/dialogContext.js.map +1 -0
  56. package/dist/src/dialogContextError.d.ts +27 -0
  57. package/dist/src/dialogContextError.js +39 -0
  58. package/dist/src/dialogContextError.js.map +1 -0
  59. package/dist/src/dialogEvent.d.ts +20 -0
  60. package/dist/src/dialogEvent.js +3 -0
  61. package/dist/src/dialogEvent.js.map +1 -0
  62. package/dist/src/dialogEvents.d.ts +15 -0
  63. package/dist/src/dialogEvents.js +20 -0
  64. package/dist/src/dialogEvents.js.map +1 -0
  65. package/dist/src/dialogHelper.d.ts +32 -0
  66. package/dist/src/dialogHelper.js +116 -0
  67. package/dist/src/dialogHelper.js.map +1 -0
  68. package/dist/src/dialogInstance.d.ts +30 -0
  69. package/dist/src/dialogInstance.js +3 -0
  70. package/dist/src/dialogInstance.js.map +1 -0
  71. package/dist/src/dialogManager.d.ts +73 -0
  72. package/dist/src/dialogManager.js +156 -0
  73. package/dist/src/dialogManager.js.map +1 -0
  74. package/dist/src/dialogReason.d.ts +35 -0
  75. package/dist/src/dialogReason.js +40 -0
  76. package/dist/src/dialogReason.js.map +1 -0
  77. package/dist/src/dialogSet.d.ts +85 -0
  78. package/dist/src/dialogSet.js +138 -0
  79. package/dist/src/dialogSet.js.map +1 -0
  80. package/dist/src/dialogTurnResult.d.ts +34 -0
  81. package/dist/src/dialogTurnResult.js +3 -0
  82. package/dist/src/dialogTurnResult.js.map +1 -0
  83. package/dist/src/dialogTurnStateConstants.d.ts +12 -0
  84. package/dist/src/dialogTurnStateConstants.js +17 -0
  85. package/dist/src/dialogTurnStateConstants.js.map +1 -0
  86. package/dist/src/dialogTurnStatus.d.ts +34 -0
  87. package/dist/src/dialogTurnStatus.js +39 -0
  88. package/dist/src/dialogTurnStatus.js.map +1 -0
  89. package/dist/src/dialogsAgentComponent.d.ts +17 -0
  90. package/dist/src/dialogsAgentComponent.js +65 -0
  91. package/dist/src/dialogsAgentComponent.js.map +1 -0
  92. package/dist/src/dialogsComponentRegistration.d.ts +28 -0
  93. package/dist/src/dialogsComponentRegistration.js +45 -0
  94. package/dist/src/dialogsComponentRegistration.js.map +1 -0
  95. package/dist/src/i18n.d.ts +15 -0
  96. package/dist/src/i18n.js +28 -0
  97. package/dist/src/i18n.js.map +1 -0
  98. package/dist/src/index.d.ts +29 -0
  99. package/dist/src/index.js +48 -0
  100. package/dist/src/index.js.map +1 -0
  101. package/dist/src/intentScore.d.ts +11 -0
  102. package/dist/src/intentScore.js +3 -0
  103. package/dist/src/intentScore.js.map +1 -0
  104. package/dist/src/memory/componentMemoryScopes.d.ts +18 -0
  105. package/dist/src/memory/componentMemoryScopes.js +54 -0
  106. package/dist/src/memory/componentMemoryScopes.js.map +1 -0
  107. package/dist/src/memory/componentPathResolvers.d.ts +18 -0
  108. package/dist/src/memory/componentPathResolvers.js +52 -0
  109. package/dist/src/memory/componentPathResolvers.js.map +1 -0
  110. package/dist/src/memory/dialogPath.d.ts +17 -0
  111. package/dist/src/memory/dialogPath.js +30 -0
  112. package/dist/src/memory/dialogPath.js.map +1 -0
  113. package/dist/src/memory/dialogStateManager.d.ts +156 -0
  114. package/dist/src/memory/dialogStateManager.js +598 -0
  115. package/dist/src/memory/dialogStateManager.js.map +1 -0
  116. package/dist/src/memory/index.d.ts +12 -0
  117. package/dist/src/memory/index.js +29 -0
  118. package/dist/src/memory/index.js.map +1 -0
  119. package/dist/src/memory/pathResolvers/aliasPathResolver.d.ts +25 -0
  120. package/dist/src/memory/pathResolvers/aliasPathResolver.js +37 -0
  121. package/dist/src/memory/pathResolvers/aliasPathResolver.js.map +1 -0
  122. package/dist/src/memory/pathResolvers/atAtPathResolver.d.ts +11 -0
  123. package/dist/src/memory/pathResolvers/atAtPathResolver.js +18 -0
  124. package/dist/src/memory/pathResolvers/atAtPathResolver.js.map +1 -0
  125. package/dist/src/memory/pathResolvers/atPathResolver.d.ts +20 -0
  126. package/dist/src/memory/pathResolvers/atPathResolver.js +46 -0
  127. package/dist/src/memory/pathResolvers/atPathResolver.js.map +1 -0
  128. package/dist/src/memory/pathResolvers/dollarPathResolver.d.ts +11 -0
  129. package/dist/src/memory/pathResolvers/dollarPathResolver.js +18 -0
  130. package/dist/src/memory/pathResolvers/dollarPathResolver.js.map +1 -0
  131. package/dist/src/memory/pathResolvers/hashPathResolver.d.ts +11 -0
  132. package/dist/src/memory/pathResolvers/hashPathResolver.js +18 -0
  133. package/dist/src/memory/pathResolvers/hashPathResolver.js.map +1 -0
  134. package/dist/src/memory/pathResolvers/index.d.ts +11 -0
  135. package/dist/src/memory/pathResolvers/index.js +28 -0
  136. package/dist/src/memory/pathResolvers/index.js.map +1 -0
  137. package/dist/src/memory/pathResolvers/pathResolver.d.ts +13 -0
  138. package/dist/src/memory/pathResolvers/pathResolver.js +7 -0
  139. package/dist/src/memory/pathResolvers/pathResolver.js.map +1 -0
  140. package/dist/src/memory/pathResolvers/percentPathResolver.d.ts +11 -0
  141. package/dist/src/memory/pathResolvers/percentPathResolver.js +18 -0
  142. package/dist/src/memory/pathResolvers/percentPathResolver.js.map +1 -0
  143. package/dist/src/memory/scopePath.d.ts +18 -0
  144. package/dist/src/memory/scopePath.js +23 -0
  145. package/dist/src/memory/scopePath.js.map +1 -0
  146. package/dist/src/memory/scopes/agentStateMemoryScope.d.ts +53 -0
  147. package/dist/src/memory/scopes/agentStateMemoryScope.js +82 -0
  148. package/dist/src/memory/scopes/agentStateMemoryScope.js.map +1 -0
  149. package/dist/src/memory/scopes/classMemoryScope.d.ts +29 -0
  150. package/dist/src/memory/scopes/classMemoryScope.js +65 -0
  151. package/dist/src/memory/scopes/classMemoryScope.js.map +1 -0
  152. package/dist/src/memory/scopes/conversationMemoryScope.d.ts +15 -0
  153. package/dist/src/memory/scopes/conversationMemoryScope.js +23 -0
  154. package/dist/src/memory/scopes/conversationMemoryScope.js.map +1 -0
  155. package/dist/src/memory/scopes/dialogClassMemoryScope.d.ts +19 -0
  156. package/dist/src/memory/scopes/dialogClassMemoryScope.js +42 -0
  157. package/dist/src/memory/scopes/dialogClassMemoryScope.js.map +1 -0
  158. package/dist/src/memory/scopes/dialogContextMemoryScope.d.ts +19 -0
  159. package/dist/src/memory/scopes/dialogContextMemoryScope.js +48 -0
  160. package/dist/src/memory/scopes/dialogContextMemoryScope.js.map +1 -0
  161. package/dist/src/memory/scopes/dialogMemoryScope.d.ts +32 -0
  162. package/dist/src/memory/scopes/dialogMemoryScope.js +74 -0
  163. package/dist/src/memory/scopes/dialogMemoryScope.js.map +1 -0
  164. package/dist/src/memory/scopes/index.d.ts +15 -0
  165. package/dist/src/memory/scopes/index.js +32 -0
  166. package/dist/src/memory/scopes/index.js.map +1 -0
  167. package/dist/src/memory/scopes/memoryScope.d.ts +52 -0
  168. package/dist/src/memory/scopes/memoryScope.js +54 -0
  169. package/dist/src/memory/scopes/memoryScope.js.map +1 -0
  170. package/dist/src/memory/scopes/settingsMemoryScope.d.ts +68 -0
  171. package/dist/src/memory/scopes/settingsMemoryScope.js +216 -0
  172. package/dist/src/memory/scopes/settingsMemoryScope.js.map +1 -0
  173. package/dist/src/memory/scopes/thisMemoryScope.d.ts +26 -0
  174. package/dist/src/memory/scopes/thisMemoryScope.js +43 -0
  175. package/dist/src/memory/scopes/thisMemoryScope.js.map +1 -0
  176. package/dist/src/memory/scopes/turnMemoryScope.d.ts +29 -0
  177. package/dist/src/memory/scopes/turnMemoryScope.js +52 -0
  178. package/dist/src/memory/scopes/turnMemoryScope.js.map +1 -0
  179. package/dist/src/memory/scopes/userMemoryScope.d.ts +15 -0
  180. package/dist/src/memory/scopes/userMemoryScope.js +23 -0
  181. package/dist/src/memory/scopes/userMemoryScope.js.map +1 -0
  182. package/dist/src/memory/turnPath.d.ts +21 -0
  183. package/dist/src/memory/turnPath.js +38 -0
  184. package/dist/src/memory/turnPath.js.map +1 -0
  185. package/dist/src/prompts/activityPrompt.d.ts +101 -0
  186. package/dist/src/prompts/activityPrompt.js +166 -0
  187. package/dist/src/prompts/activityPrompt.js.map +1 -0
  188. package/dist/src/prompts/attachmentPrompt.d.ts +37 -0
  189. package/dist/src/prompts/attachmentPrompt.js +55 -0
  190. package/dist/src/prompts/attachmentPrompt.js.map +1 -0
  191. package/dist/src/prompts/choicePrompt.d.ts +83 -0
  192. package/dist/src/prompts/choicePrompt.js +116 -0
  193. package/dist/src/prompts/choicePrompt.js.map +1 -0
  194. package/dist/src/prompts/confirmPrompt.d.ts +82 -0
  195. package/dist/src/prompts/confirmPrompt.js +163 -0
  196. package/dist/src/prompts/confirmPrompt.js.map +1 -0
  197. package/dist/src/prompts/datetimePrompt.d.ts +65 -0
  198. package/dist/src/prompts/datetimePrompt.js +109 -0
  199. package/dist/src/prompts/datetimePrompt.js.map +1 -0
  200. package/dist/src/prompts/index.d.ts +13 -0
  201. package/dist/src/prompts/index.js +30 -0
  202. package/dist/src/prompts/index.js.map +1 -0
  203. package/dist/src/prompts/numberPrompt.d.ts +55 -0
  204. package/dist/src/prompts/numberPrompt.js +134 -0
  205. package/dist/src/prompts/numberPrompt.js.map +1 -0
  206. package/dist/src/prompts/prompt.d.ts +256 -0
  207. package/dist/src/prompts/prompt.js +260 -0
  208. package/dist/src/prompts/prompt.js.map +1 -0
  209. package/dist/src/prompts/promptCultureModels.d.ts +72 -0
  210. package/dist/src/prompts/promptCultureModels.js +123 -0
  211. package/dist/src/prompts/promptCultureModels.js.map +1 -0
  212. package/dist/src/prompts/textPrompt.d.ts +54 -0
  213. package/dist/src/prompts/textPrompt.js +72 -0
  214. package/dist/src/prompts/textPrompt.js.map +1 -0
  215. package/dist/src/recognizer.d.ts +43 -0
  216. package/dist/src/recognizer.js +104 -0
  217. package/dist/src/recognizer.js.map +1 -0
  218. package/dist/src/recognizerResult.d.ts +19 -0
  219. package/dist/src/recognizerResult.js +24 -0
  220. package/dist/src/recognizerResult.js.map +1 -0
  221. package/dist/src/serviceCollection.d.ts +112 -0
  222. package/dist/src/serviceCollection.js +209 -0
  223. package/dist/src/serviceCollection.js.map +1 -0
  224. package/dist/src/stringUtils.d.ts +36 -0
  225. package/dist/src/stringUtils.js +62 -0
  226. package/dist/src/stringUtils.js.map +1 -0
  227. package/dist/src/template.d.ts +18 -0
  228. package/dist/src/template.js +7 -0
  229. package/dist/src/template.js.map +1 -0
  230. package/dist/src/waterfallDialog.d.ts +101 -0
  231. package/dist/src/waterfallDialog.js +179 -0
  232. package/dist/src/waterfallDialog.js.map +1 -0
  233. package/dist/src/waterfallStepContext.d.ts +71 -0
  234. package/dist/src/waterfallStepContext.js +78 -0
  235. package/dist/src/waterfallStepContext.js.map +1 -0
  236. package/package.json +49 -0
  237. package/src/agentComponent.ts +23 -0
  238. package/src/agentStateSet.ts +75 -0
  239. package/src/choices/choice.ts +16 -0
  240. package/src/choices/choiceFactory.ts +189 -0
  241. package/src/choices/findChoices.ts +70 -0
  242. package/src/choices/findValues.ts +179 -0
  243. package/src/choices/index.ts +11 -0
  244. package/src/choices/modelResult.ts +11 -0
  245. package/src/choices/recognizeChoices.ts +94 -0
  246. package/src/choices/tokenizer.ts +93 -0
  247. package/src/componentDialog.ts +306 -0
  248. package/src/componentRegistration.ts +30 -0
  249. package/src/configurable.ts +55 -0
  250. package/src/configuration.ts +22 -0
  251. package/src/converter.ts +15 -0
  252. package/src/dialog.ts +243 -0
  253. package/src/dialogContainer.ts +90 -0
  254. package/src/dialogContext.ts +607 -0
  255. package/src/dialogContextError.ts +50 -0
  256. package/src/dialogEvent.ts +23 -0
  257. package/src/dialogEvents.ts +16 -0
  258. package/src/dialogHelper.ts +154 -0
  259. package/src/dialogInstance.ts +32 -0
  260. package/src/dialogManager.ts +202 -0
  261. package/src/dialogReason.ts +40 -0
  262. package/src/dialogSet.ts +168 -0
  263. package/src/dialogTurnResult.ts +37 -0
  264. package/src/dialogTurnStateConstants.ts +13 -0
  265. package/src/dialogTurnStatus.ts +38 -0
  266. package/src/dialogsAgentComponent.ts +71 -0
  267. package/src/dialogsComponentRegistration.ts +49 -0
  268. package/src/i18n.ts +17 -0
  269. package/src/index.ts +31 -0
  270. package/src/intentScore.ts +11 -0
  271. package/src/memory/componentMemoryScopes.ts +28 -0
  272. package/src/memory/componentPathResolvers.ts +29 -0
  273. package/src/memory/dialogPath.ts +33 -0
  274. package/src/memory/dialogStateManager.ts +661 -0
  275. package/src/memory/index.ts +12 -0
  276. package/src/memory/pathResolvers/aliasPathResolver.ts +44 -0
  277. package/src/memory/pathResolvers/atAtPathResolver.ts +14 -0
  278. package/src/memory/pathResolvers/atPathResolver.ts +45 -0
  279. package/src/memory/pathResolvers/dollarPathResolver.ts +14 -0
  280. package/src/memory/pathResolvers/hashPathResolver.ts +14 -0
  281. package/src/memory/pathResolvers/index.ts +11 -0
  282. package/src/memory/pathResolvers/pathResolver.ts +14 -0
  283. package/src/memory/pathResolvers/percentPathResolver.ts +14 -0
  284. package/src/memory/scopePath.ts +19 -0
  285. package/src/memory/scopes/agentStateMemoryScope.ts +92 -0
  286. package/src/memory/scopes/classMemoryScope.ts +71 -0
  287. package/src/memory/scopes/conversationMemoryScope.ts +19 -0
  288. package/src/memory/scopes/dialogClassMemoryScope.ts +43 -0
  289. package/src/memory/scopes/dialogContextMemoryScope.ts +51 -0
  290. package/src/memory/scopes/dialogMemoryScope.ts +79 -0
  291. package/src/memory/scopes/index.ts +15 -0
  292. package/src/memory/scopes/memoryScope.ts +70 -0
  293. package/src/memory/scopes/settingsMemoryScope.ts +239 -0
  294. package/src/memory/scopes/thisMemoryScope.ts +44 -0
  295. package/src/memory/scopes/turnMemoryScope.ts +54 -0
  296. package/src/memory/scopes/userMemoryScope.ts +19 -0
  297. package/src/memory/turnPath.ts +45 -0
  298. package/src/prompts/activityPrompt.ts +202 -0
  299. package/src/prompts/attachmentPrompt.ts +62 -0
  300. package/src/prompts/choicePrompt.ts +176 -0
  301. package/src/prompts/confirmPrompt.ts +182 -0
  302. package/src/prompts/datetimePrompt.ts +110 -0
  303. package/src/prompts/index.ts +13 -0
  304. package/src/prompts/numberPrompt.ts +117 -0
  305. package/src/prompts/prompt.ts +459 -0
  306. package/src/prompts/promptCultureModels.ts +178 -0
  307. package/src/prompts/textPrompt.ts +82 -0
  308. package/src/recognizer.ts +127 -0
  309. package/src/recognizerResult.ts +37 -0
  310. package/src/serviceCollection.ts +305 -0
  311. package/src/stringUtils.ts +62 -0
  312. package/src/template.ts +20 -0
  313. package/src/waterfallDialog.ts +215 -0
  314. package/src/waterfallStepContext.ts +96 -0
  315. package/vendor/cldr-data/README.md +5 -0
  316. package/vendor/cldr-data/main/de/numbers.json +156 -0
  317. package/vendor/cldr-data/main/en/numbers.json +159 -0
  318. package/vendor/cldr-data/main/es/numbers.json +156 -0
  319. package/vendor/cldr-data/main/fr/numbers.json +157 -0
  320. package/vendor/cldr-data/main/ja/numbers.json +120 -0
  321. package/vendor/cldr-data/main/nl/numbers.json +156 -0
  322. package/vendor/cldr-data/main/pt/numbers.json +156 -0
  323. package/vendor/cldr-data/main/zh/numbers.json +214 -0
  324. package/vendor/cldr-data/supplemental/likelySubtags.json +1844 -0
  325. package/vendor/cldr-data/supplemental/numberingSystems.json +343 -0
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+ import { AgentStateMemoryScope } from './agentStateMemoryScope';
6
+ /**
7
+ * Memory that's scoped to the current conversation.
8
+ */
9
+ export declare class ConversationMemoryScope extends AgentStateMemoryScope {
10
+ protected stateKey: string;
11
+ /**
12
+ * Initializes a new instance of the ConversationMemoryScope class.
13
+ */
14
+ constructor();
15
+ }
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ConversationMemoryScope = void 0;
4
+ /**
5
+ * Copyright (c) Microsoft Corporation. All rights reserved.
6
+ * Licensed under the MIT License.
7
+ */
8
+ const agentStateMemoryScope_1 = require("./agentStateMemoryScope");
9
+ const scopePath_1 = require("../scopePath");
10
+ /**
11
+ * Memory that's scoped to the current conversation.
12
+ */
13
+ class ConversationMemoryScope extends agentStateMemoryScope_1.AgentStateMemoryScope {
14
+ /**
15
+ * Initializes a new instance of the ConversationMemoryScope class.
16
+ */
17
+ constructor() {
18
+ super(scopePath_1.ScopePath.conversation);
19
+ this.stateKey = 'ConversationState';
20
+ }
21
+ }
22
+ exports.ConversationMemoryScope = ConversationMemoryScope;
23
+ //# sourceMappingURL=conversationMemoryScope.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversationMemoryScope.js","sourceRoot":"","sources":["../../../../src/memory/scopes/conversationMemoryScope.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,mEAA+D;AAC/D,4CAAwC;AAExC;;GAEG;AACH,MAAa,uBAAwB,SAAQ,6CAAqB;IAEhE;;SAEK;IACL;QACE,KAAK,CAAC,qBAAS,CAAC,YAAY,CAAC,CAAA;QALrB,aAAQ,GAAG,mBAAmB,CAAA;IAMxC,CAAC;CACF;AARD,0DAQC"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+ import { ClassMemoryScope } from './classMemoryScope';
6
+ import { DialogContext } from '../../dialogContext';
7
+ import { Dialog } from '../../dialog';
8
+ export declare class DialogClassMemoryScope extends ClassMemoryScope {
9
+ /**
10
+ * Initializes a new instance of the DialogClassMemoryScope class.
11
+ */
12
+ constructor();
13
+ /**
14
+ * @protected
15
+ * @param dialogContext The DialogContext object for this turn.
16
+ * @returns The current Dialog.
17
+ */
18
+ protected onFindDialog(dialogContext: DialogContext): Dialog | undefined;
19
+ }
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DialogClassMemoryScope = void 0;
4
+ /**
5
+ * Copyright (c) Microsoft Corporation. All rights reserved.
6
+ * Licensed under the MIT License.
7
+ */
8
+ const classMemoryScope_1 = require("./classMemoryScope");
9
+ const scopePath_1 = require("../scopePath");
10
+ const dialogContainer_1 = require("../../dialogContainer");
11
+ class DialogClassMemoryScope extends classMemoryScope_1.ClassMemoryScope {
12
+ /**
13
+ * Initializes a new instance of the DialogClassMemoryScope class.
14
+ */
15
+ constructor() {
16
+ super(scopePath_1.ScopePath.dialogClass);
17
+ }
18
+ /**
19
+ * @protected
20
+ * @param dialogContext The DialogContext object for this turn.
21
+ * @returns The current Dialog.
22
+ */
23
+ onFindDialog(dialogContext) {
24
+ // Is the active dialog a container?
25
+ const dialog = dialogContext.findDialog(dialogContext.activeDialog.id);
26
+ if (dialog && dialog instanceof dialogContainer_1.DialogContainer) {
27
+ return dialog;
28
+ }
29
+ // Return parent dialog if there is one?
30
+ const parent = dialogContext.parent;
31
+ if (parent && parent.activeDialog) {
32
+ const parentDialog = parent.findDialog(parent.activeDialog.id);
33
+ if (parentDialog) {
34
+ return parentDialog;
35
+ }
36
+ }
37
+ // Fallback to returning current dialog
38
+ return dialog;
39
+ }
40
+ }
41
+ exports.DialogClassMemoryScope = DialogClassMemoryScope;
42
+ //# sourceMappingURL=dialogClassMemoryScope.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dialogClassMemoryScope.js","sourceRoot":"","sources":["../../../../src/memory/scopes/dialogClassMemoryScope.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,yDAAqD;AACrD,4CAAwC;AAGxC,2DAAuD;AAEvD,MAAa,sBAAuB,SAAQ,mCAAgB;IAC1D;;SAEK;IACL;QACE,KAAK,CAAC,qBAAS,CAAC,WAAW,CAAC,CAAA;IAC9B,CAAC;IAED;;;;SAIK;IACK,YAAY,CAAE,aAA4B;QAClD,oCAAoC;QACpC,MAAM,MAAM,GAAG,aAAa,CAAC,UAAU,CAAC,aAAa,CAAC,YAAY,CAAC,EAAE,CAAC,CAAA;QACtE,IAAI,MAAM,IAAI,MAAM,YAAY,iCAAe,EAAE,CAAC;YAChD,OAAO,MAAM,CAAA;QACf,CAAC;QAED,wCAAwC;QACxC,MAAM,MAAM,GAAG,aAAa,CAAC,MAAM,CAAA;QACnC,IAAI,MAAM,IAAI,MAAM,CAAC,YAAY,EAAE,CAAC;YAClC,MAAM,YAAY,GAAG,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC,CAAA;YAC9D,IAAI,YAAY,EAAE,CAAC;gBACjB,OAAO,YAAY,CAAA;YACrB,CAAC;QACH,CAAC;QAED,uCAAuC;QACvC,OAAO,MAAM,CAAA;IACf,CAAC;CACF;AAhCD,wDAgCC"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+ import { DialogContext } from '../../dialogContext';
6
+ import { MemoryScope } from './memoryScope';
7
+ export declare class DialogContextMemoryScope extends MemoryScope {
8
+ /**
9
+ * Initializes a new instance of the `DialogContextMemoryScope` class.
10
+ */
11
+ constructor();
12
+ /**
13
+ * Gets the backing memory for this scope.
14
+ *
15
+ * @param dialogContext The `DialogContext` object for this turn.
16
+ * @returns Memory for the scope.
17
+ */
18
+ getMemory(dialogContext: DialogContext): Record<'stack' | 'activeDialog' | 'parent', unknown>;
19
+ }
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright (c) Microsoft Corporation. All rights reserved.
4
+ * Licensed under the MIT License.
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.DialogContextMemoryScope = void 0;
8
+ const memoryScope_1 = require("./memoryScope");
9
+ const scopePath_1 = require("../scopePath");
10
+ class DialogContextMemoryScope extends memoryScope_1.MemoryScope {
11
+ /**
12
+ * Initializes a new instance of the `DialogContextMemoryScope` class.
13
+ */
14
+ constructor() {
15
+ super(scopePath_1.ScopePath.dialogContext, false);
16
+ }
17
+ /**
18
+ * Gets the backing memory for this scope.
19
+ *
20
+ * @param dialogContext The `DialogContext` object for this turn.
21
+ * @returns Memory for the scope.
22
+ */
23
+ getMemory(dialogContext) {
24
+ const stack = [];
25
+ let currentDialogContext = dialogContext;
26
+ // go to leaf node
27
+ while (currentDialogContext.child) {
28
+ currentDialogContext = currentDialogContext.child;
29
+ }
30
+ while (currentDialogContext) {
31
+ for (let i = currentDialogContext.stack.length - 1; i >= 0; i--) {
32
+ const item = currentDialogContext.stack[i];
33
+ // filter out ActionScope items because they are internal bookkeeping.
34
+ if (!item.id.startsWith('ActionScope[')) {
35
+ stack.push(item.id);
36
+ }
37
+ }
38
+ currentDialogContext = currentDialogContext.parent;
39
+ }
40
+ return {
41
+ stack,
42
+ activeDialog: dialogContext.activeDialog && dialogContext.activeDialog.id,
43
+ parent: dialogContext.parent && dialogContext.parent.activeDialog && dialogContext.parent.activeDialog.id,
44
+ };
45
+ }
46
+ }
47
+ exports.DialogContextMemoryScope = DialogContextMemoryScope;
48
+ //# sourceMappingURL=dialogContextMemoryScope.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dialogContextMemoryScope.js","sourceRoot":"","sources":["../../../../src/memory/scopes/dialogContextMemoryScope.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,+CAA2C;AAC3C,4CAAwC;AAExC,MAAa,wBAAyB,SAAQ,yBAAW;IACvD;;SAEK;IACL;QACE,KAAK,CAAC,qBAAS,CAAC,aAAa,EAAE,KAAK,CAAC,CAAA;IACvC,CAAC;IAED;;;;;SAKK;IACL,SAAS,CAAE,aAA4B;QACrC,MAAM,KAAK,GAAG,EAAE,CAAA;QAChB,IAAI,oBAAoB,GAA8B,aAAa,CAAA;QAEnE,kBAAkB;QAClB,OAAO,oBAAoB,CAAC,KAAK,EAAE,CAAC;YAClC,oBAAoB,GAAG,oBAAoB,CAAC,KAAK,CAAA;QACnD,CAAC;QAED,OAAO,oBAAoB,EAAE,CAAC;YAC5B,KAAK,IAAI,CAAC,GAAG,oBAAoB,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;gBAChE,MAAM,IAAI,GAAG,oBAAoB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;gBAC1C,sEAAsE;gBACtE,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE,CAAC;oBACxC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;gBACrB,CAAC;YACH,CAAC;YAED,oBAAoB,GAAG,oBAAoB,CAAC,MAAM,CAAA;QACpD,CAAC;QAED,OAAO;YACL,KAAK;YACL,YAAY,EAAE,aAAa,CAAC,YAAY,IAAI,aAAa,CAAC,YAAY,CAAC,EAAE;YACzE,MAAM,EAAE,aAAa,CAAC,MAAM,IAAI,aAAa,CAAC,MAAM,CAAC,YAAY,IAAI,aAAa,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE;SAC1G,CAAA;IACH,CAAC;CACF;AAzCD,4DAyCC"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+ import { MemoryScope } from './memoryScope';
6
+ import { DialogContext } from '../../dialogContext';
7
+ export declare class DialogMemoryScope extends MemoryScope {
8
+ /**
9
+ * Initializes a new instance of the DialogMemoryScope class.
10
+ */
11
+ constructor();
12
+ /**
13
+ * Gets the backing memory for this scope.
14
+ *
15
+ * @param dialogContext The DialogContext object for this turn.
16
+ * @returns The memory for the scope.
17
+ */
18
+ getMemory(dialogContext: DialogContext): object;
19
+ /**
20
+ * Changes the backing object for the memory scope.
21
+ *
22
+ * @param dialogContext The DialogContext object for this turn.
23
+ * @param memory Memory object to set for the scope.
24
+ */
25
+ setMemory(dialogContext: DialogContext, memory: object): void;
26
+ /**
27
+ * @private
28
+ * @param dialogContext The DialogContext object for this turn.
29
+ * @returns A boolean indicating whether is a cointainer or not.
30
+ */
31
+ private isContainer;
32
+ }
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DialogMemoryScope = void 0;
4
+ /**
5
+ * Copyright (c) Microsoft Corporation. All rights reserved.
6
+ * Licensed under the MIT License.
7
+ */
8
+ const memoryScope_1 = require("./memoryScope");
9
+ const scopePath_1 = require("../scopePath");
10
+ const dialogContainer_1 = require("../../dialogContainer");
11
+ class DialogMemoryScope extends memoryScope_1.MemoryScope {
12
+ /**
13
+ * Initializes a new instance of the DialogMemoryScope class.
14
+ */
15
+ constructor() {
16
+ super(scopePath_1.ScopePath.dialog);
17
+ }
18
+ /**
19
+ * Gets the backing memory for this scope.
20
+ *
21
+ * @param dialogContext The DialogContext object for this turn.
22
+ * @returns The memory for the scope.
23
+ */
24
+ getMemory(dialogContext) {
25
+ // If active dialog is a container dialog then "dialog" binds to it.
26
+ // Otherwise the "dialog" will bind to the dialogs parent assuming it
27
+ // is a container.
28
+ let parent = dialogContext;
29
+ if (!this.isContainer(parent) && parent.parent && this.isContainer(parent.parent)) {
30
+ parent = parent.parent;
31
+ }
32
+ // If there's no active dialog then return undefined.
33
+ return parent.activeDialog ? parent.activeDialog.state : {};
34
+ }
35
+ /**
36
+ * Changes the backing object for the memory scope.
37
+ *
38
+ * @param dialogContext The DialogContext object for this turn.
39
+ * @param memory Memory object to set for the scope.
40
+ */
41
+ setMemory(dialogContext, memory) {
42
+ if (memory === undefined) {
43
+ throw new Error('DialogMemoryScope.setMemory: undefined memory object passed in.');
44
+ }
45
+ // If active dialog is a container dialog then "dialog" binds to it.
46
+ // Otherwise the "dialog" will bind to the dialogs parent assuming it
47
+ // is a container.
48
+ let parent = dialogContext;
49
+ if (!this.isContainer(parent) && parent.parent && this.isContainer(parent.parent)) {
50
+ parent = parent.parent;
51
+ }
52
+ // If there's no active dialog then throw an error.
53
+ if (!parent.activeDialog) {
54
+ throw new Error('DialogMemoryScope.setMemory: no active dialog found.');
55
+ }
56
+ parent.activeDialog.state = memory;
57
+ }
58
+ /**
59
+ * @private
60
+ * @param dialogContext The DialogContext object for this turn.
61
+ * @returns A boolean indicating whether is a cointainer or not.
62
+ */
63
+ isContainer(dialogContext) {
64
+ if (dialogContext !== undefined && dialogContext.activeDialog !== undefined) {
65
+ const dialog = dialogContext.findDialog(dialogContext.activeDialog.id);
66
+ if (dialog instanceof dialogContainer_1.DialogContainer) {
67
+ return true;
68
+ }
69
+ }
70
+ return false;
71
+ }
72
+ }
73
+ exports.DialogMemoryScope = DialogMemoryScope;
74
+ //# sourceMappingURL=dialogMemoryScope.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dialogMemoryScope.js","sourceRoot":"","sources":["../../../../src/memory/scopes/dialogMemoryScope.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,+CAA2C;AAC3C,4CAAwC;AAExC,2DAAuD;AAEvD,MAAa,iBAAkB,SAAQ,yBAAW;IAChD;;SAEK;IACL;QACE,KAAK,CAAC,qBAAS,CAAC,MAAM,CAAC,CAAA;IACzB,CAAC;IAED;;;;;SAKK;IACL,SAAS,CAAE,aAA4B;QACrC,oEAAoE;QACpE,qEAAqE;QACrE,kBAAkB;QAClB,IAAI,MAAM,GAAkB,aAAa,CAAA;QACzC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,MAAM,IAAI,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;YAClF,MAAM,GAAG,MAAM,CAAC,MAAM,CAAA;QACxB,CAAC;QAED,qDAAqD;QACrD,OAAO,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAA;IAC7D,CAAC;IAED;;;;;SAKK;IACL,SAAS,CAAE,aAA4B,EAAE,MAAc;QACrD,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YACzB,MAAM,IAAI,KAAK,CAAC,iEAAiE,CAAC,CAAA;QACpF,CAAC;QAED,oEAAoE;QACpE,qEAAqE;QACrE,kBAAkB;QAClB,IAAI,MAAM,GAAkB,aAAa,CAAA;QACzC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,MAAM,IAAI,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;YAClF,MAAM,GAAG,MAAM,CAAC,MAAM,CAAA;QACxB,CAAC;QAED,mDAAmD;QACnD,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC;YACzB,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAA;QACzE,CAAC;QAED,MAAM,CAAC,YAAY,CAAC,KAAK,GAAG,MAAM,CAAA;IACpC,CAAC;IAED;;;;SAIK;IACG,WAAW,CAAE,aAA4B;QAC/C,IAAI,aAAa,KAAK,SAAS,IAAI,aAAa,CAAC,YAAY,KAAK,SAAS,EAAE,CAAC;YAC5E,MAAM,MAAM,GAAG,aAAa,CAAC,UAAU,CAAC,aAAa,CAAC,YAAY,CAAC,EAAE,CAAC,CAAA;YACtE,IAAI,MAAM,YAAY,iCAAe,EAAE,CAAC;gBACtC,OAAO,IAAI,CAAA;YACb,CAAC;QACH,CAAC;QAED,OAAO,KAAK,CAAA;IACd,CAAC;CACF;AArED,8CAqEC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+ export * from './agentStateMemoryScope';
6
+ export * from './classMemoryScope';
7
+ export * from './conversationMemoryScope';
8
+ export * from './dialogClassMemoryScope';
9
+ export * from './dialogContextMemoryScope';
10
+ export * from './dialogMemoryScope';
11
+ export * from './memoryScope';
12
+ export * from './settingsMemoryScope';
13
+ export * from './thisMemoryScope';
14
+ export * from './turnMemoryScope';
15
+ export * from './userMemoryScope';
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ /**
18
+ * Copyright (c) Microsoft Corporation. All rights reserved.
19
+ * Licensed under the MIT License.
20
+ */
21
+ __exportStar(require("./agentStateMemoryScope"), exports);
22
+ __exportStar(require("./classMemoryScope"), exports);
23
+ __exportStar(require("./conversationMemoryScope"), exports);
24
+ __exportStar(require("./dialogClassMemoryScope"), exports);
25
+ __exportStar(require("./dialogContextMemoryScope"), exports);
26
+ __exportStar(require("./dialogMemoryScope"), exports);
27
+ __exportStar(require("./memoryScope"), exports);
28
+ __exportStar(require("./settingsMemoryScope"), exports);
29
+ __exportStar(require("./thisMemoryScope"), exports);
30
+ __exportStar(require("./turnMemoryScope"), exports);
31
+ __exportStar(require("./userMemoryScope"), exports);
32
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/memory/scopes/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;GAGG;AACH,0DAAuC;AACvC,qDAAkC;AAClC,4DAAyC;AACzC,2DAAwC;AACxC,6DAA0C;AAC1C,sDAAmC;AACnC,gDAA6B;AAC7B,wDAAqC;AACrC,oDAAiC;AACjC,oDAAiC;AACjC,oDAAiC"}
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+ import { DialogContext } from '../../dialogContext';
6
+ /**
7
+ * Abstract base class for all memory scopes.
8
+ */
9
+ export declare abstract class MemoryScope {
10
+ /**
11
+ * Initializes a new instance of the MemoryScope class.
12
+ *
13
+ * @param name Name of the scope.
14
+ * @param includeInSnapshot Boolean value indicating whether this memory
15
+ * should be included in snapshot. Default value is true.
16
+ */
17
+ constructor(name: string, includeInSnapshot?: boolean);
18
+ readonly name: string;
19
+ readonly includeInSnapshot: boolean;
20
+ /**
21
+ * Get the backing memory for this scope
22
+ *
23
+ * @param dialogContext Current dialog context.
24
+ * @returns memory for the scope
25
+ */
26
+ abstract getMemory(dialogContext: DialogContext): object;
27
+ /**
28
+ * Changes the backing object for the memory scope.
29
+ *
30
+ * @param _dialogContext Current dialog context
31
+ * @param _memory memory to assign
32
+ */
33
+ setMemory(_dialogContext: DialogContext, _memory: object): void;
34
+ /**
35
+ * Loads a scopes backing memory at the start of a turn.
36
+ *
37
+ * @param _dialogContext Current dialog context.
38
+ */
39
+ load(_dialogContext: DialogContext): Promise<void>;
40
+ /**
41
+ * Saves a scopes backing memory at the end of a turn.
42
+ *
43
+ * @param _dialogContext Current dialog context.
44
+ */
45
+ saveChanges(_dialogContext: DialogContext): Promise<void>;
46
+ /**
47
+ * Deletes the backing memory for a scope.
48
+ *
49
+ * @param _dialogContext Current dialog context.
50
+ */
51
+ delete(_dialogContext: DialogContext): Promise<void>;
52
+ }
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MemoryScope = void 0;
4
+ /**
5
+ * Abstract base class for all memory scopes.
6
+ */
7
+ class MemoryScope {
8
+ /**
9
+ * Initializes a new instance of the MemoryScope class.
10
+ *
11
+ * @param name Name of the scope.
12
+ * @param includeInSnapshot Boolean value indicating whether this memory
13
+ * should be included in snapshot. Default value is true.
14
+ */
15
+ constructor(name, includeInSnapshot = true) {
16
+ this.includeInSnapshot = includeInSnapshot;
17
+ this.name = name;
18
+ }
19
+ /**
20
+ * Changes the backing object for the memory scope.
21
+ *
22
+ * @param _dialogContext Current dialog context
23
+ * @param _memory memory to assign
24
+ */
25
+ setMemory(_dialogContext, _memory) {
26
+ throw new Error(`MemoryScope.setMemory: The '${this.name}' memory scope is read-only.`);
27
+ }
28
+ /**
29
+ * Loads a scopes backing memory at the start of a turn.
30
+ *
31
+ * @param _dialogContext Current dialog context.
32
+ */
33
+ async load(_dialogContext) {
34
+ // No initialization by default.
35
+ }
36
+ /**
37
+ * Saves a scopes backing memory at the end of a turn.
38
+ *
39
+ * @param _dialogContext Current dialog context.
40
+ */
41
+ async saveChanges(_dialogContext) {
42
+ // No initialization by default.
43
+ }
44
+ /**
45
+ * Deletes the backing memory for a scope.
46
+ *
47
+ * @param _dialogContext Current dialog context.
48
+ */
49
+ async delete(_dialogContext) {
50
+ throw new Error(`MemoryScope.delete: The '${this.name}' memory scope can't be deleted.`);
51
+ }
52
+ }
53
+ exports.MemoryScope = MemoryScope;
54
+ //# sourceMappingURL=memoryScope.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"memoryScope.js","sourceRoot":"","sources":["../../../../src/memory/scopes/memoryScope.ts"],"names":[],"mappings":";;;AAMA;;GAEG;AACH,MAAsB,WAAW;IAC/B;;;;;;SAMK;IACL,YAAa,IAAY,EAAE,iBAAiB,GAAG,IAAI;QACjD,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAA;QAC1C,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;IAClB,CAAC;IAaD;;;;;SAKK;IACL,SAAS,CAAE,cAA6B,EAAE,OAAe;QACvD,MAAM,IAAI,KAAK,CAAC,+BAA+B,IAAI,CAAC,IAAI,8BAA8B,CAAC,CAAA;IACzF,CAAC;IAED;;;;SAIK;IACL,KAAK,CAAC,IAAI,CAAE,cAA6B;QACvC,gCAAgC;IAClC,CAAC;IAED;;;;SAIK;IACL,KAAK,CAAC,WAAW,CAAE,cAA6B;QAC9C,gCAAgC;IAClC,CAAC;IAED;;;;SAIK;IACL,KAAK,CAAC,MAAM,CAAE,cAA6B;QACzC,MAAM,IAAI,KAAK,CAAC,4BAA4B,IAAI,CAAC,IAAI,kCAAkC,CAAC,CAAA;IAC1F,CAAC;CACF;AA5DD,kCA4DC"}
@@ -0,0 +1,68 @@
1
+ /**
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+ import { DialogContext } from '../../dialogContext';
6
+ import { MemoryScope } from './memoryScope';
7
+ export declare class SettingsMemoryScope extends MemoryScope {
8
+ private readonly initialSettings?;
9
+ private static readonly blockingList;
10
+ /**
11
+ * Initializes a new instance of the SettingsMemoryScope class.
12
+ *
13
+ * @param initialSettings initial set of settings to supply
14
+ */
15
+ constructor(initialSettings?: Record<string, unknown>);
16
+ /**
17
+ * Gets the backing memory for this scope.
18
+ *
19
+ * @param {DialogContext} dialogContext The DialogContext object for this turn.
20
+ * @returns {Record<string, ?>} The memory for the scope.
21
+ */
22
+ getMemory(dialogContext: DialogContext): Record<string, unknown>;
23
+ /**
24
+ * @param dialogContext Current dialog context.
25
+ */
26
+ load(dialogContext: DialogContext): Promise<void>;
27
+ /**
28
+ * Build a dictionary view of configuration providers.
29
+ *
30
+ * @param {Record<string, string>} configuration The configuration that we are running with.
31
+ * @returns {Record<string, ?>} Projected dictionary for settings.
32
+ */
33
+ protected static loadSettings(configuration: Record<string, string>): Record<string, unknown>;
34
+ /**
35
+ * Generate a node tree with the flatten settings.
36
+ * For example:
37
+ * {
38
+ * "array":["item1", "item2"],
39
+ * "object":{"array":["item1"], "2":"numberkey"}
40
+ * }
41
+ *
42
+ * Would generate a flatten settings like:
43
+ * array:0 item1
44
+ * array:1 item2
45
+ * object:array:0 item1
46
+ * object:2 numberkey
47
+ *
48
+ * After Converting it from flatten settings into node tree, would get:
49
+ *
50
+ * null
51
+ * | |
52
+ * array object
53
+ * | | | |
54
+ * 0 1 array 2
55
+ * | | | |
56
+ * item1 item2 0 numberkey
57
+ * |
58
+ * item1
59
+ * The result is a Tree.
60
+ *
61
+ * @param {Array<[string, string]>} kvs Configurations with key value pairs.
62
+ * @returns {Node} The root node of the tree.
63
+ */
64
+ private static convertFlattenSettingToNode;
65
+ private static convertNodeToObject;
66
+ private static filterSettings;
67
+ private static deletePropertyPath;
68
+ }