@microsoft/agents-hosting-dialogs 0.2.14 → 0.4.1

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 (161) hide show
  1. package/dist/src/agentComponent.d.ts +18 -4
  2. package/dist/src/agentComponent.js +12 -4
  3. package/dist/src/agentComponent.js.map +1 -1
  4. package/dist/src/agentStateSet.d.ts +2 -2
  5. package/dist/src/agentStateSet.js +2 -2
  6. package/dist/src/choices/choice.d.ts +9 -0
  7. package/dist/src/choices/findChoices.d.ts +12 -0
  8. package/dist/src/choices/findChoices.js.map +1 -1
  9. package/dist/src/choices/findValues.d.ts +27 -0
  10. package/dist/src/choices/findValues.js.map +1 -1
  11. package/dist/src/choices/modelResult.d.ts +20 -0
  12. package/dist/src/choices/modelResult.js +4 -0
  13. package/dist/src/choices/modelResult.js.map +1 -1
  14. package/dist/src/choices/tokenizer.d.ts +15 -0
  15. package/dist/src/choices/tokenizer.js +4 -0
  16. package/dist/src/choices/tokenizer.js.map +1 -1
  17. package/dist/src/configurable.d.ts +1 -0
  18. package/dist/src/configurable.js +1 -0
  19. package/dist/src/configurable.js.map +1 -1
  20. package/dist/src/converter.d.ts +10 -1
  21. package/dist/src/dialog.d.ts +14 -13
  22. package/dist/src/dialog.js +11 -10
  23. package/dist/src/dialog.js.map +1 -1
  24. package/dist/src/dialogContext.d.ts +34 -35
  25. package/dist/src/dialogContext.js +24 -25
  26. package/dist/src/dialogContext.js.map +1 -1
  27. package/dist/src/dialogEvent.d.ts +3 -0
  28. package/dist/src/dialogEvents.d.ts +20 -0
  29. package/dist/src/dialogEvents.js +20 -0
  30. package/dist/src/dialogEvents.js.map +1 -1
  31. package/dist/src/dialogHelper.js +14 -0
  32. package/dist/src/dialogHelper.js.map +1 -1
  33. package/dist/src/dialogManager.d.ts +0 -1
  34. package/dist/src/dialogManager.js +0 -1
  35. package/dist/src/dialogManager.js.map +1 -1
  36. package/dist/src/dialogSet.d.ts +5 -9
  37. package/dist/src/dialogSet.js +5 -9
  38. package/dist/src/dialogSet.js.map +1 -1
  39. package/dist/src/dialogTurnStateConstants.d.ts +13 -1
  40. package/dist/src/dialogTurnStateConstants.js +13 -1
  41. package/dist/src/dialogTurnStateConstants.js.map +1 -1
  42. package/dist/src/intentScore.d.ts +6 -0
  43. package/dist/src/memory/dialogPath.d.ts +40 -8
  44. package/dist/src/memory/dialogPath.js +32 -8
  45. package/dist/src/memory/dialogPath.js.map +1 -1
  46. package/dist/src/memory/dialogStateManager.d.ts +2 -2
  47. package/dist/src/memory/dialogStateManager.js +2 -2
  48. package/dist/src/memory/pathResolvers/aliasPathResolver.d.ts +4 -0
  49. package/dist/src/memory/pathResolvers/aliasPathResolver.js +4 -0
  50. package/dist/src/memory/pathResolvers/aliasPathResolver.js.map +1 -1
  51. package/dist/src/memory/pathResolvers/atAtPathResolver.d.ts +6 -2
  52. package/dist/src/memory/pathResolvers/atAtPathResolver.js +6 -2
  53. package/dist/src/memory/pathResolvers/atAtPathResolver.js.map +1 -1
  54. package/dist/src/memory/pathResolvers/atPathResolver.d.ts +13 -7
  55. package/dist/src/memory/pathResolvers/atPathResolver.js +13 -7
  56. package/dist/src/memory/pathResolvers/atPathResolver.js.map +1 -1
  57. package/dist/src/memory/pathResolvers/dollarPathResolver.d.ts +7 -2
  58. package/dist/src/memory/pathResolvers/dollarPathResolver.js +7 -2
  59. package/dist/src/memory/pathResolvers/dollarPathResolver.js.map +1 -1
  60. package/dist/src/memory/pathResolvers/hashPathResolver.d.ts +7 -2
  61. package/dist/src/memory/pathResolvers/hashPathResolver.js +7 -2
  62. package/dist/src/memory/pathResolvers/hashPathResolver.js.map +1 -1
  63. package/dist/src/memory/pathResolvers/pathResolver.d.ts +10 -5
  64. package/dist/src/memory/pathResolvers/percentPathResolver.d.ts +7 -2
  65. package/dist/src/memory/pathResolvers/percentPathResolver.js +7 -2
  66. package/dist/src/memory/pathResolvers/percentPathResolver.js.map +1 -1
  67. package/dist/src/memory/scopePath.d.ts +27 -0
  68. package/dist/src/memory/scopePath.js +27 -0
  69. package/dist/src/memory/scopePath.js.map +1 -1
  70. package/dist/src/memory/scopes/classMemoryScope.d.ts +18 -14
  71. package/dist/src/memory/scopes/classMemoryScope.js +18 -14
  72. package/dist/src/memory/scopes/classMemoryScope.js.map +1 -1
  73. package/dist/src/memory/scopes/dialogClassMemoryScope.d.ts +12 -6
  74. package/dist/src/memory/scopes/dialogClassMemoryScope.js +12 -6
  75. package/dist/src/memory/scopes/dialogClassMemoryScope.js.map +1 -1
  76. package/dist/src/memory/scopes/dialogContextMemoryScope.d.ts +11 -7
  77. package/dist/src/memory/scopes/dialogContextMemoryScope.js +11 -7
  78. package/dist/src/memory/scopes/dialogContextMemoryScope.js.map +1 -1
  79. package/dist/src/memory/scopes/dialogMemoryScope.d.ts +23 -16
  80. package/dist/src/memory/scopes/dialogMemoryScope.js +23 -16
  81. package/dist/src/memory/scopes/dialogMemoryScope.js.map +1 -1
  82. package/dist/src/memory/scopes/turnMemoryScope.d.ts +14 -13
  83. package/dist/src/memory/scopes/turnMemoryScope.js +14 -13
  84. package/dist/src/memory/scopes/turnMemoryScope.js.map +1 -1
  85. package/dist/src/memory/turnPath.d.ts +61 -13
  86. package/dist/src/memory/turnPath.js +49 -13
  87. package/dist/src/memory/turnPath.js.map +1 -1
  88. package/dist/src/prompts/attachmentPrompt.d.ts +1 -1
  89. package/dist/src/prompts/attachmentPrompt.js +1 -1
  90. package/dist/src/prompts/choicePrompt.d.ts +17 -3
  91. package/dist/src/prompts/choicePrompt.js +1 -1
  92. package/dist/src/prompts/choicePrompt.js.map +1 -1
  93. package/dist/src/prompts/confirmPrompt.d.ts +6 -6
  94. package/dist/src/prompts/confirmPrompt.js +3 -3
  95. package/dist/src/prompts/datetimePrompt.d.ts +6 -6
  96. package/dist/src/prompts/datetimePrompt.js +3 -3
  97. package/dist/src/prompts/numberPrompt.d.ts +6 -6
  98. package/dist/src/prompts/numberPrompt.js +6 -6
  99. package/dist/src/prompts/prompt.d.ts +7 -7
  100. package/dist/src/prompts/prompt.js +2 -2
  101. package/dist/src/prompts/promptCultureModels.d.ts +38 -3
  102. package/dist/src/prompts/promptCultureModels.js +38 -3
  103. package/dist/src/prompts/promptCultureModels.js.map +1 -1
  104. package/dist/src/recognizer.d.ts +8 -1
  105. package/dist/src/recognizer.js +5 -1
  106. package/dist/src/recognizer.js.map +1 -1
  107. package/dist/src/recognizerResult.d.ts +15 -0
  108. package/dist/src/recognizerResult.js.map +1 -1
  109. package/dist/src/serviceCollection.d.ts +22 -22
  110. package/dist/src/serviceCollection.js +11 -11
  111. package/dist/src/waterfallDialog.d.ts +5 -5
  112. package/dist/src/waterfallDialog.js +5 -5
  113. package/dist/src/waterfallStepContext.d.ts +21 -0
  114. package/dist/src/waterfallStepContext.js.map +1 -1
  115. package/package.json +2 -2
  116. package/src/agentComponent.ts +18 -4
  117. package/src/agentStateSet.ts +2 -2
  118. package/src/choices/choice.ts +11 -0
  119. package/src/choices/findChoices.ts +15 -0
  120. package/src/choices/findValues.ts +33 -0
  121. package/src/choices/modelResult.ts +25 -0
  122. package/src/choices/tokenizer.ts +19 -0
  123. package/src/configurable.ts +1 -0
  124. package/src/converter.ts +10 -1
  125. package/src/dialog.ts +14 -13
  126. package/src/dialogContext.ts +42 -43
  127. package/src/dialogEvent.ts +3 -0
  128. package/src/dialogEvents.ts +25 -0
  129. package/src/dialogHelper.ts +14 -1
  130. package/src/dialogManager.ts +0 -1
  131. package/src/dialogSet.ts +5 -9
  132. package/src/dialogTurnStateConstants.ts +15 -1
  133. package/src/intentScore.ts +9 -2
  134. package/src/memory/dialogPath.ts +47 -23
  135. package/src/memory/dialogStateManager.ts +2 -2
  136. package/src/memory/pathResolvers/aliasPathResolver.ts +4 -0
  137. package/src/memory/pathResolvers/atAtPathResolver.ts +6 -2
  138. package/src/memory/pathResolvers/atPathResolver.ts +13 -7
  139. package/src/memory/pathResolvers/dollarPathResolver.ts +7 -2
  140. package/src/memory/pathResolvers/hashPathResolver.ts +7 -2
  141. package/src/memory/pathResolvers/pathResolver.ts +10 -5
  142. package/src/memory/pathResolvers/percentPathResolver.ts +7 -2
  143. package/src/memory/scopePath.ts +35 -0
  144. package/src/memory/scopes/classMemoryScope.ts +18 -14
  145. package/src/memory/scopes/dialogClassMemoryScope.ts +12 -6
  146. package/src/memory/scopes/dialogContextMemoryScope.ts +11 -7
  147. package/src/memory/scopes/dialogMemoryScope.ts +23 -16
  148. package/src/memory/scopes/turnMemoryScope.ts +14 -13
  149. package/src/memory/turnPath.ts +61 -25
  150. package/src/prompts/attachmentPrompt.ts +1 -1
  151. package/src/prompts/choicePrompt.ts +18 -3
  152. package/src/prompts/confirmPrompt.ts +6 -6
  153. package/src/prompts/datetimePrompt.ts +6 -6
  154. package/src/prompts/numberPrompt.ts +6 -6
  155. package/src/prompts/prompt.ts +7 -7
  156. package/src/prompts/promptCultureModels.ts +38 -3
  157. package/src/recognizer.ts +8 -1
  158. package/src/recognizerResult.ts +24 -5
  159. package/src/serviceCollection.ts +22 -22
  160. package/src/waterfallDialog.ts +5 -5
  161. package/src/waterfallStepContext.ts +32 -6
@@ -5,25 +5,29 @@
5
5
  import { MemoryScope } from './memoryScope';
6
6
  import { DialogContext } from '../../dialogContext';
7
7
  import { Dialog } from '../../dialog';
8
+ /**
9
+ * A memory scope that provides access to the properties of the active dialog.
10
+ * This scope binds to the active dialog and clones its properties for use in memory.
11
+ */
8
12
  export declare class ClassMemoryScope extends MemoryScope {
9
13
  /**
10
- * Initializes a new instance of the ClassMemoryScope class.
11
- *
12
- * @param name Name of the scope class.
13
- */
14
+ * Initializes a new instance of the ClassMemoryScope class.
15
+ *
16
+ * @param name - Name of the scope class. Defaults to `ScopePath.class`.
17
+ */
14
18
  constructor(name?: string);
15
19
  /**
16
- * Gets the backing memory for this scope.
17
- *
18
- * @param dialogContext The DialogContext object for this turn.
19
- * @returns The memory for the scope.
20
- */
20
+ * Gets the backing memory for this scope.
21
+ *
22
+ * @param dialogContext - The DialogContext object for this turn.
23
+ * @returns The memory for the scope, containing cloned properties of the active dialog.
24
+ */
21
25
  getMemory(dialogContext: DialogContext): object;
22
26
  /**
23
- * Override to find the dialog instance referenced by the scope.
24
- *
25
- * @param dialogContext Current dialog context.
26
- * @returns The dialog instance referenced by the scope.
27
- */
27
+ * Override to find the dialog instance referenced by the scope.
28
+ *
29
+ * @param dialogContext - Current dialog context.
30
+ * @returns The dialog instance referenced by the scope, or undefined if not found.
31
+ */
28
32
  protected onFindDialog(dialogContext: DialogContext): Dialog | undefined;
29
33
  }
@@ -7,21 +7,25 @@ exports.ClassMemoryScope = void 0;
7
7
  */
8
8
  const memoryScope_1 = require("./memoryScope");
9
9
  const scopePath_1 = require("../scopePath");
10
+ /**
11
+ * A memory scope that provides access to the properties of the active dialog.
12
+ * This scope binds to the active dialog and clones its properties for use in memory.
13
+ */
10
14
  class ClassMemoryScope extends memoryScope_1.MemoryScope {
11
15
  /**
12
- * Initializes a new instance of the ClassMemoryScope class.
13
- *
14
- * @param name Name of the scope class.
15
- */
16
+ * Initializes a new instance of the ClassMemoryScope class.
17
+ *
18
+ * @param name - Name of the scope class. Defaults to `ScopePath.class`.
19
+ */
16
20
  constructor(name = scopePath_1.ScopePath.class) {
17
21
  super(name, false);
18
22
  }
19
23
  /**
20
- * Gets the backing memory for this scope.
21
- *
22
- * @param dialogContext The DialogContext object for this turn.
23
- * @returns The memory for the scope.
24
- */
24
+ * Gets the backing memory for this scope.
25
+ *
26
+ * @param dialogContext - The DialogContext object for this turn.
27
+ * @returns The memory for the scope, containing cloned properties of the active dialog.
28
+ */
25
29
  getMemory(dialogContext) {
26
30
  // if active dialog is a container dialog then "dialog" binds to it
27
31
  if (dialogContext.activeDialog) {
@@ -49,11 +53,11 @@ class ClassMemoryScope extends memoryScope_1.MemoryScope {
49
53
  return {};
50
54
  }
51
55
  /**
52
- * Override to find the dialog instance referenced by the scope.
53
- *
54
- * @param dialogContext Current dialog context.
55
- * @returns The dialog instance referenced by the scope.
56
- */
56
+ * Override to find the dialog instance referenced by the scope.
57
+ *
58
+ * @param dialogContext - Current dialog context.
59
+ * @returns The dialog instance referenced by the scope, or undefined if not found.
60
+ */
57
61
  onFindDialog(dialogContext) {
58
62
  return dialogContext.findDialog(dialogContext.activeDialog.id);
59
63
  }
@@ -1 +1 @@
1
- {"version":3,"file":"classMemoryScope.js","sourceRoot":"","sources":["../../../../src/memory/scopes/classMemoryScope.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,+CAA2C;AAC3C,4CAAwC;AAIxC,MAAa,gBAAiB,SAAQ,yBAAW;IAC/C;;;;SAIK;IACL,YAAa,IAAI,GAAG,qBAAS,CAAC,KAAK;QACjC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;IACpB,CAAC;IAED;;;;;SAKK;IACL,SAAS,CAAE,aAA4B;QACrC,mEAAmE;QACnE,IAAI,aAAa,CAAC,YAAY,EAAE,CAAC;YAC/B,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY,CAAC,aAAa,CAAC,CAAA;YAC/C,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;gBACzB,mBAAmB;gBACnB,MAAM,KAAK,GAAW,EAAE,CAAA;gBACxB,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC;oBACzB,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC,CAAA;oBACxB,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,OAAO,IAAI,KAAK,UAAU,EAAE,CAAC;wBACpF,IAAI,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC;4BACvB,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,KAAK,CAAC,CAAA;4BAC9D,IAAI,CAAC,KAAK,EAAE,CAAC;gCACX,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;4BACpB,CAAC;wBACH,CAAC;6BAAM,CAAC;4BACN,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAA;wBACnB,CAAC;oBACH,CAAC;gBACH,CAAC;gBAED,OAAO,KAAK,CAAA;YACd,CAAC;QACH,CAAC;QAED,OAAO,EAAE,CAAA;IACX,CAAC;IAED;;;;;SAKK;IACK,YAAY,CAAE,aAA4B;QAClD,OAAO,aAAa,CAAC,UAAU,CAAC,aAAa,CAAC,YAAY,CAAC,EAAE,CAAC,CAAA;IAChE,CAAC;CACF;AArDD,4CAqDC;AAED,SAAS,YAAY,CAAE,IAAS;IAC9B,OAAO,OAAO,IAAI,KAAK,QAAQ,IAAI,OAAO,IAAI,CAAC,aAAa,CAAC,KAAK,UAAU,CAAA;AAC9E,CAAC"}
1
+ {"version":3,"file":"classMemoryScope.js","sourceRoot":"","sources":["../../../../src/memory/scopes/classMemoryScope.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,+CAA2C;AAC3C,4CAAwC;AAIxC;;;GAGG;AACH,MAAa,gBAAiB,SAAQ,yBAAW;IAC/C;;;;OAIG;IACH,YAAa,IAAI,GAAG,qBAAS,CAAC,KAAK;QACjC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;IACpB,CAAC;IAED;;;;;OAKG;IACH,SAAS,CAAE,aAA4B;QACrC,mEAAmE;QACnE,IAAI,aAAa,CAAC,YAAY,EAAE,CAAC;YAC/B,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY,CAAC,aAAa,CAAC,CAAA;YAC/C,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;gBACzB,mBAAmB;gBACnB,MAAM,KAAK,GAAW,EAAE,CAAA;gBACxB,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC;oBACzB,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC,CAAA;oBACxB,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,OAAO,IAAI,KAAK,UAAU,EAAE,CAAC;wBACpF,IAAI,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC;4BACvB,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,KAAK,CAAC,CAAA;4BAC9D,IAAI,CAAC,KAAK,EAAE,CAAC;gCACX,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;4BACpB,CAAC;wBACH,CAAC;6BAAM,CAAC;4BACN,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAA;wBACnB,CAAC;oBACH,CAAC;gBACH,CAAC;gBAED,OAAO,KAAK,CAAA;YACd,CAAC;QACH,CAAC;QAED,OAAO,EAAE,CAAA;IACX,CAAC;IAED;;;;;OAKG;IACO,YAAY,CAAE,aAA4B;QAClD,OAAO,aAAa,CAAC,UAAU,CAAC,aAAa,CAAC,YAAY,CAAC,EAAE,CAAC,CAAA;IAChE,CAAC;CACF;AArDD,4CAqDC;AAED,SAAS,YAAY,CAAE,IAAS;IAC9B,OAAO,OAAO,IAAI,KAAK,QAAQ,IAAI,OAAO,IAAI,CAAC,aAAa,CAAC,KAAK,UAAU,CAAA;AAC9E,CAAC"}
@@ -5,15 +5,21 @@
5
5
  import { ClassMemoryScope } from './classMemoryScope';
6
6
  import { DialogContext } from '../../dialogContext';
7
7
  import { Dialog } from '../../dialog';
8
+ /**
9
+ * A memory scope that provides access to the properties of the active dialog class.
10
+ * This scope resolves to the active dialog if it is a container, or to its parent dialog.
11
+ */
8
12
  export declare class DialogClassMemoryScope extends ClassMemoryScope {
9
13
  /**
10
- * Initializes a new instance of the DialogClassMemoryScope class.
11
- */
14
+ * Initializes a new instance of the DialogClassMemoryScope class.
15
+ */
12
16
  constructor();
13
17
  /**
14
- * @protected
15
- * @param dialogContext The DialogContext object for this turn.
16
- * @returns The current Dialog.
17
- */
18
+ * @protected
19
+ * Finds the dialog instance referenced by the scope.
20
+ *
21
+ * @param dialogContext - The DialogContext object for this turn.
22
+ * @returns The current dialog, or its parent dialog if applicable.
23
+ */
18
24
  protected onFindDialog(dialogContext: DialogContext): Dialog | undefined;
19
25
  }
@@ -8,18 +8,24 @@ exports.DialogClassMemoryScope = void 0;
8
8
  const classMemoryScope_1 = require("./classMemoryScope");
9
9
  const scopePath_1 = require("../scopePath");
10
10
  const dialogContainer_1 = require("../../dialogContainer");
11
+ /**
12
+ * A memory scope that provides access to the properties of the active dialog class.
13
+ * This scope resolves to the active dialog if it is a container, or to its parent dialog.
14
+ */
11
15
  class DialogClassMemoryScope extends classMemoryScope_1.ClassMemoryScope {
12
16
  /**
13
- * Initializes a new instance of the DialogClassMemoryScope class.
14
- */
17
+ * Initializes a new instance of the DialogClassMemoryScope class.
18
+ */
15
19
  constructor() {
16
20
  super(scopePath_1.ScopePath.dialogClass);
17
21
  }
18
22
  /**
19
- * @protected
20
- * @param dialogContext The DialogContext object for this turn.
21
- * @returns The current Dialog.
22
- */
23
+ * @protected
24
+ * Finds the dialog instance referenced by the scope.
25
+ *
26
+ * @param dialogContext - The DialogContext object for this turn.
27
+ * @returns The current dialog, or its parent dialog if applicable.
28
+ */
23
29
  onFindDialog(dialogContext) {
24
30
  // Is the active dialog a container?
25
31
  const dialog = dialogContext.findDialog(dialogContext.activeDialog.id);
@@ -1 +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"}
1
+ {"version":3,"file":"dialogClassMemoryScope.js","sourceRoot":"","sources":["../../../../src/memory/scopes/dialogClassMemoryScope.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,yDAAqD;AACrD,4CAAwC;AAGxC,2DAAuD;AAEvD;;;GAGG;AACH,MAAa,sBAAuB,SAAQ,mCAAgB;IAC1D;;OAEG;IACH;QACE,KAAK,CAAC,qBAAS,CAAC,WAAW,CAAC,CAAA;IAC9B,CAAC;IAED;;;;;;OAMG;IACO,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;AAlCD,wDAkCC"}
@@ -4,16 +4,20 @@
4
4
  */
5
5
  import { DialogContext } from '../../dialogContext';
6
6
  import { MemoryScope } from './memoryScope';
7
+ /**
8
+ * A memory scope that provides access to the dialog context.
9
+ * This scope includes information about the active dialog, its parent, and the dialog stack.
10
+ */
7
11
  export declare class DialogContextMemoryScope extends MemoryScope {
8
12
  /**
9
- * Initializes a new instance of the `DialogContextMemoryScope` class.
10
- */
13
+ * Initializes a new instance of the `DialogContextMemoryScope` class.
14
+ */
11
15
  constructor();
12
16
  /**
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
- */
17
+ * Gets the backing memory for this scope.
18
+ *
19
+ * @param dialogContext - The `DialogContext` object for this turn.
20
+ * @returns An object containing the dialog stack, active dialog ID, and parent dialog ID.
21
+ */
18
22
  getMemory(dialogContext: DialogContext): Record<'stack' | 'activeDialog' | 'parent', unknown>;
19
23
  }
@@ -7,19 +7,23 @@ Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.DialogContextMemoryScope = void 0;
8
8
  const memoryScope_1 = require("./memoryScope");
9
9
  const scopePath_1 = require("../scopePath");
10
+ /**
11
+ * A memory scope that provides access to the dialog context.
12
+ * This scope includes information about the active dialog, its parent, and the dialog stack.
13
+ */
10
14
  class DialogContextMemoryScope extends memoryScope_1.MemoryScope {
11
15
  /**
12
- * Initializes a new instance of the `DialogContextMemoryScope` class.
13
- */
16
+ * Initializes a new instance of the `DialogContextMemoryScope` class.
17
+ */
14
18
  constructor() {
15
19
  super(scopePath_1.ScopePath.dialogContext, false);
16
20
  }
17
21
  /**
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
- */
22
+ * Gets the backing memory for this scope.
23
+ *
24
+ * @param dialogContext - The `DialogContext` object for this turn.
25
+ * @returns An object containing the dialog stack, active dialog ID, and parent dialog ID.
26
+ */
23
27
  getMemory(dialogContext) {
24
28
  const stack = [];
25
29
  let currentDialogContext = dialogContext;
@@ -1 +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"}
1
+ {"version":3,"file":"dialogContextMemoryScope.js","sourceRoot":"","sources":["../../../../src/memory/scopes/dialogContextMemoryScope.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,+CAA2C;AAC3C,4CAAwC;AAExC;;;GAGG;AACH,MAAa,wBAAyB,SAAQ,yBAAW;IACvD;;OAEG;IACH;QACE,KAAK,CAAC,qBAAS,CAAC,aAAa,EAAE,KAAK,CAAC,CAAA;IACvC,CAAC;IAED;;;;;OAKG;IACH,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"}
@@ -4,29 +4,36 @@
4
4
  */
5
5
  import { MemoryScope } from './memoryScope';
6
6
  import { DialogContext } from '../../dialogContext';
7
+ /**
8
+ * A memory scope that provides access to the active dialog's state.
9
+ * This scope binds to the active dialog if it is a container, or to its parent dialog if applicable.
10
+ */
7
11
  export declare class DialogMemoryScope extends MemoryScope {
8
12
  /**
9
- * Initializes a new instance of the DialogMemoryScope class.
10
- */
13
+ * Initializes a new instance of the DialogMemoryScope class.
14
+ */
11
15
  constructor();
12
16
  /**
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
- */
17
+ * Gets the backing memory for this scope.
18
+ *
19
+ * @param dialogContext - The DialogContext object for this turn.
20
+ * @returns The memory for the scope.
21
+ */
18
22
  getMemory(dialogContext: DialogContext): object;
19
23
  /**
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
- */
24
+ * Changes the backing object for the memory scope.
25
+ *
26
+ * @param dialogContext - The DialogContext object for this turn.
27
+ * @param memory - Memory object to set for the scope.
28
+ * @throws Will throw an error if the memory object is undefined or if no active dialog is found.
29
+ */
25
30
  setMemory(dialogContext: DialogContext, memory: object): void;
26
31
  /**
27
- * @private
28
- * @param dialogContext The DialogContext object for this turn.
29
- * @returns A boolean indicating whether is a cointainer or not.
30
- */
32
+ * Determines if the given dialog context is a container.
33
+ *
34
+ * @private
35
+ * @param dialogContext - The DialogContext object for this turn.
36
+ * @returns A boolean indicating whether the dialog context is a container.
37
+ */
31
38
  private isContainer;
32
39
  }
@@ -8,19 +8,23 @@ exports.DialogMemoryScope = void 0;
8
8
  const memoryScope_1 = require("./memoryScope");
9
9
  const scopePath_1 = require("../scopePath");
10
10
  const dialogContainer_1 = require("../../dialogContainer");
11
+ /**
12
+ * A memory scope that provides access to the active dialog's state.
13
+ * This scope binds to the active dialog if it is a container, or to its parent dialog if applicable.
14
+ */
11
15
  class DialogMemoryScope extends memoryScope_1.MemoryScope {
12
16
  /**
13
- * Initializes a new instance of the DialogMemoryScope class.
14
- */
17
+ * Initializes a new instance of the DialogMemoryScope class.
18
+ */
15
19
  constructor() {
16
20
  super(scopePath_1.ScopePath.dialog);
17
21
  }
18
22
  /**
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
- */
23
+ * Gets the backing memory for this scope.
24
+ *
25
+ * @param dialogContext - The DialogContext object for this turn.
26
+ * @returns The memory for the scope.
27
+ */
24
28
  getMemory(dialogContext) {
25
29
  // If active dialog is a container dialog then "dialog" binds to it.
26
30
  // Otherwise the "dialog" will bind to the dialogs parent assuming it
@@ -33,11 +37,12 @@ class DialogMemoryScope extends memoryScope_1.MemoryScope {
33
37
  return parent.activeDialog ? parent.activeDialog.state : {};
34
38
  }
35
39
  /**
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
- */
40
+ * Changes the backing object for the memory scope.
41
+ *
42
+ * @param dialogContext - The DialogContext object for this turn.
43
+ * @param memory - Memory object to set for the scope.
44
+ * @throws Will throw an error if the memory object is undefined or if no active dialog is found.
45
+ */
41
46
  setMemory(dialogContext, memory) {
42
47
  if (memory === undefined) {
43
48
  throw new Error('DialogMemoryScope.setMemory: undefined memory object passed in.');
@@ -56,10 +61,12 @@ class DialogMemoryScope extends memoryScope_1.MemoryScope {
56
61
  parent.activeDialog.state = memory;
57
62
  }
58
63
  /**
59
- * @private
60
- * @param dialogContext The DialogContext object for this turn.
61
- * @returns A boolean indicating whether is a cointainer or not.
62
- */
64
+ * Determines if the given dialog context is a container.
65
+ *
66
+ * @private
67
+ * @param dialogContext - The DialogContext object for this turn.
68
+ * @returns A boolean indicating whether the dialog context is a container.
69
+ */
63
70
  isContainer(dialogContext) {
64
71
  if (dialogContext !== undefined && dialogContext.activeDialog !== undefined) {
65
72
  const dialog = dialogContext.findDialog(dialogContext.activeDialog.id);
@@ -1 +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"}
1
+ {"version":3,"file":"dialogMemoryScope.js","sourceRoot":"","sources":["../../../../src/memory/scopes/dialogMemoryScope.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,+CAA2C;AAC3C,4CAAwC;AAExC,2DAAuD;AAEvD;;;GAGG;AACH,MAAa,iBAAkB,SAAQ,yBAAW;IAChD;;OAEG;IACH;QACE,KAAK,CAAC,qBAAS,CAAC,MAAM,CAAC,CAAA;IACzB,CAAC;IAED;;;;;OAKG;IACH,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;;;;;;OAMG;IACH,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;;;;;;OAMG;IACK,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;AAxED,8CAwEC"}
@@ -5,25 +5,26 @@
5
5
  import { MemoryScope } from './memoryScope';
6
6
  import { DialogContext } from '../../dialogContext';
7
7
  /**
8
- * TurnMemoryScope represents memory scoped to the current turn.
8
+ * A memory scope that provides access to the turn's state.
9
+ * This scope is used to store and retrieve information specific to the current turn.
9
10
  */
10
11
  export declare class TurnMemoryScope extends MemoryScope {
11
12
  /**
12
- * Initializes a new instance of the TurnMemoryScope class.
13
- */
13
+ * Initializes a new instance of the TurnMemoryScope class.
14
+ */
14
15
  constructor();
15
16
  /**
16
- * Get the backing memory for this scope.
17
- *
18
- * @param dialogContext The DialogContext for this turn.
19
- * @returns The memory for the scope.
20
- */
17
+ * Gets the backing memory for this scope.
18
+ *
19
+ * @param dialogContext - The DialogContext object for this turn.
20
+ * @returns The memory for the scope.
21
+ */
21
22
  getMemory(dialogContext: DialogContext): object;
22
23
  /**
23
- * Changes the backing object for the memory scope.
24
- *
25
- * @param dialogContext The DialogContext for this turn.
26
- * @param memory Memory object to set for the scope.
27
- */
24
+ * Changes the backing object for the memory scope.
25
+ *
26
+ * @param dialogContext - The DialogContext object for this turn.
27
+ * @param memory - Memory object to set for the scope.
28
+ */
28
29
  setMemory(dialogContext: DialogContext, memory: object): void;
29
30
  }
@@ -12,21 +12,22 @@ const scopePath_1 = require("../scopePath");
12
12
  */
13
13
  const TURN_STATE = 'turn';
14
14
  /**
15
- * TurnMemoryScope represents memory scoped to the current turn.
15
+ * A memory scope that provides access to the turn's state.
16
+ * This scope is used to store and retrieve information specific to the current turn.
16
17
  */
17
18
  class TurnMemoryScope extends memoryScope_1.MemoryScope {
18
19
  /**
19
- * Initializes a new instance of the TurnMemoryScope class.
20
- */
20
+ * Initializes a new instance of the TurnMemoryScope class.
21
+ */
21
22
  constructor() {
22
23
  super(scopePath_1.ScopePath.turn, true);
23
24
  }
24
25
  /**
25
- * Get the backing memory for this scope.
26
- *
27
- * @param dialogContext The DialogContext for this turn.
28
- * @returns The memory for the scope.
29
- */
26
+ * Gets the backing memory for this scope.
27
+ *
28
+ * @param dialogContext - The DialogContext object for this turn.
29
+ * @returns The memory for the scope.
30
+ */
30
31
  getMemory(dialogContext) {
31
32
  let memory = dialogContext.context.turnState.get(TURN_STATE);
32
33
  if (typeof memory !== 'object') {
@@ -36,11 +37,11 @@ class TurnMemoryScope extends memoryScope_1.MemoryScope {
36
37
  return memory;
37
38
  }
38
39
  /**
39
- * Changes the backing object for the memory scope.
40
- *
41
- * @param dialogContext The DialogContext for this turn.
42
- * @param memory Memory object to set for the scope.
43
- */
40
+ * Changes the backing object for the memory scope.
41
+ *
42
+ * @param dialogContext - The DialogContext object for this turn.
43
+ * @param memory - Memory object to set for the scope.
44
+ */
44
45
  setMemory(dialogContext, memory) {
45
46
  if (memory === undefined) {
46
47
  throw new Error('TurnMemoryScope.setMemory: undefined memory object passed in.');
@@ -1 +1 @@
1
- {"version":3,"file":"turnMemoryScope.js","sourceRoot":"","sources":["../../../../src/memory/scopes/turnMemoryScope.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,+CAA2C;AAC3C,4CAAwC;AAGxC;;GAEG;AACH,MAAM,UAAU,GAAG,MAAM,CAAA;AAEzB;;GAEG;AACH,MAAa,eAAgB,SAAQ,yBAAW;IAC9C;;SAEK;IACL;QACE,KAAK,CAAC,qBAAS,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;IAC7B,CAAC;IAED;;;;;SAKK;IACL,SAAS,CAAE,aAA4B;QACrC,IAAI,MAAM,GAAG,aAAa,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,CAAA;QAC5D,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;YAC/B,MAAM,GAAG,EAAE,CAAA;YACX,aAAa,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,EAAE,MAAM,CAAC,CAAA;QACzD,CAAC;QAED,OAAO,MAAM,CAAA;IACf,CAAC;IAED;;;;;SAKK;IACL,SAAS,CAAE,aAA4B,EAAE,MAAc;QACrD,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YACzB,MAAM,IAAI,KAAK,CAAC,+DAA+D,CAAC,CAAA;QAClF,CAAC;QAED,aAAa,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,EAAE,MAAM,CAAC,CAAA;IACzD,CAAC;CACF;AArCD,0CAqCC"}
1
+ {"version":3,"file":"turnMemoryScope.js","sourceRoot":"","sources":["../../../../src/memory/scopes/turnMemoryScope.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,+CAA2C;AAC3C,4CAAwC;AAGxC;;GAEG;AACH,MAAM,UAAU,GAAG,MAAM,CAAA;AAEzB;;;GAGG;AACH,MAAa,eAAgB,SAAQ,yBAAW;IAC9C;;OAEG;IACH;QACE,KAAK,CAAC,qBAAS,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;IAC7B,CAAC;IAED;;;;;OAKG;IACH,SAAS,CAAE,aAA4B;QACrC,IAAI,MAAM,GAAG,aAAa,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,CAAA;QAC5D,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;YAC/B,MAAM,GAAG,EAAE,CAAA;YACX,aAAa,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,EAAE,MAAM,CAAC,CAAA;QACzD,CAAC;QAED,OAAO,MAAM,CAAA;IACf,CAAC;IAED;;;;;OAKG;IACH,SAAS,CAAE,aAA4B,EAAE,MAAc;QACrD,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YACzB,MAAM,IAAI,KAAK,CAAC,+DAA+D,CAAC,CAAA;QAClF,CAAC;QAED,aAAa,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,EAAE,MAAM,CAAC,CAAA;IACzD,CAAC;CACF;AArCD,0CAqCC"}
@@ -3,19 +3,67 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  /**
6
- * Defines path for avaiable turns.
6
+ * Defines path for available turns.
7
7
  */
8
8
  export declare class TurnPath {
9
- static readonly lastResult = "turn.lastresult";
10
- static readonly activity = "turn.activity";
11
- static readonly recognized = "turn.recognized";
12
- static readonly topIntent = "turn.recognized.intent";
13
- static readonly topScore = "turn.recognized.score";
14
- static readonly text = "turn.recognized.text";
15
- static readonly unrecognizedText = "turn.unrecognizedText";
16
- static readonly recognizedEntities = "turn.recognizedEntities";
17
- static readonly interrupted = "turn.interrupted";
18
- static readonly dialogEvent = "turn.dialogEvent";
19
- static readonly repeatedIds = "turn.repeatedIds";
20
- static readonly activityProcessed = "turn.activityProcessed";
9
+ /**
10
+ * The result from the last dialog that was called.
11
+ * @constant A string key representing the last result path (`'turn.lastresult'`).
12
+ */
13
+ static readonly lastResult: string;
14
+ /**
15
+ * The current activity for the turn.
16
+ * @constant A string key representing the activity path (`'turn.activity'`).
17
+ */
18
+ static readonly activity: string;
19
+ /**
20
+ * The recognized result for the current turn.
21
+ * @constant A string key representing the recognized result path (`'turn.recognized'`).
22
+ */
23
+ static readonly recognized: string;
24
+ /**
25
+ * Path to the top intent.
26
+ * @constant A string key representing the top intent path (`'turn.recognized.intent'`).
27
+ */
28
+ static readonly topIntent: string;
29
+ /**
30
+ * Path to the top score.
31
+ * @constant A string key representing the top score path (`'turn.recognized.score'`).
32
+ */
33
+ static readonly topScore: string;
34
+ /**
35
+ * Original text.
36
+ * @constant A string key representing the original text path (`'turn.recognized.text'`).
37
+ */
38
+ static readonly text: string;
39
+ /**
40
+ * Original utterance split into unrecognized strings.
41
+ * @constant A string key representing the unrecognized text path (`'turn.unrecognizedText'`).
42
+ */
43
+ static readonly unrecognizedText: string;
44
+ /**
45
+ * Entities that were recognized from text.
46
+ * @constant A string key representing the recognized entities path (`'turn.recognizedEntities'`).
47
+ */
48
+ static readonly recognizedEntities: string;
49
+ /**
50
+ * If true, an interruption has occurred.
51
+ * @constant A string key representing the interrupted path (`'turn.interrupted'`).
52
+ */
53
+ static readonly interrupted: string;
54
+ /**
55
+ * The current dialog event (set during event processing).
56
+ * @constant A string key representing the dialog event path (`'turn.dialogEvent'`).
57
+ */
58
+ static readonly dialogEvent: string;
59
+ /**
60
+ * Used to track that we don't end up in an infinite loop of RepeatDialogs().
61
+ * @constant A string key representing the repeated IDs path (`'turn.repeatedIds'`).
62
+ */
63
+ static readonly repeatedIds: string;
64
+ /**
65
+ * Indicates whether the turncontext.activity has been consumed by some component in the system.
66
+ * @constant A string key representing the activity processed path (`'turn.activityProcessed'`).
67
+ */
68
+ static readonly activityProcessed: string;
21
69
  }
@@ -6,33 +6,69 @@
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.TurnPath = void 0;
8
8
  /**
9
- * Defines path for avaiable turns.
9
+ * Defines path for available turns.
10
10
  */
11
11
  class TurnPath {
12
12
  }
13
13
  exports.TurnPath = TurnPath;
14
- /// The result from the last dialog that was called.
14
+ /**
15
+ * The result from the last dialog that was called.
16
+ * @constant A string key representing the last result path (`'turn.lastresult'`).
17
+ */
15
18
  TurnPath.lastResult = 'turn.lastresult';
16
- /// The current activity for the turn.
19
+ /**
20
+ * The current activity for the turn.
21
+ * @constant A string key representing the activity path (`'turn.activity'`).
22
+ */
17
23
  TurnPath.activity = 'turn.activity';
18
- /// The recognized result for the current turn.
24
+ /**
25
+ * The recognized result for the current turn.
26
+ * @constant A string key representing the recognized result path (`'turn.recognized'`).
27
+ */
19
28
  TurnPath.recognized = 'turn.recognized';
20
- /// Path to the top intent.
29
+ /**
30
+ * Path to the top intent.
31
+ * @constant A string key representing the top intent path (`'turn.recognized.intent'`).
32
+ */
21
33
  TurnPath.topIntent = 'turn.recognized.intent';
22
- /// Path to the top score.
34
+ /**
35
+ * Path to the top score.
36
+ * @constant A string key representing the top score path (`'turn.recognized.score'`).
37
+ */
23
38
  TurnPath.topScore = 'turn.recognized.score';
24
- /// Original text.
39
+ /**
40
+ * Original text.
41
+ * @constant A string key representing the original text path (`'turn.recognized.text'`).
42
+ */
25
43
  TurnPath.text = 'turn.recognized.text';
26
- /// Original utterance split into unrecognized strings.
44
+ /**
45
+ * Original utterance split into unrecognized strings.
46
+ * @constant A string key representing the unrecognized text path (`'turn.unrecognizedText'`).
47
+ */
27
48
  TurnPath.unrecognizedText = 'turn.unrecognizedText';
28
- /// Entities that were recognized from text.
49
+ /**
50
+ * Entities that were recognized from text.
51
+ * @constant A string key representing the recognized entities path (`'turn.recognizedEntities'`).
52
+ */
29
53
  TurnPath.recognizedEntities = 'turn.recognizedEntities';
30
- /// If true an interruption has occured.
54
+ /**
55
+ * If true, an interruption has occurred.
56
+ * @constant A string key representing the interrupted path (`'turn.interrupted'`).
57
+ */
31
58
  TurnPath.interrupted = 'turn.interrupted';
32
- /// The current dialog event (set during event processings).
59
+ /**
60
+ * The current dialog event (set during event processing).
61
+ * @constant A string key representing the dialog event path (`'turn.dialogEvent'`).
62
+ */
33
63
  TurnPath.dialogEvent = 'turn.dialogEvent';
34
- /// Used to track that we don't end up in infinite loop of RepeatDialogs().
64
+ /**
65
+ * Used to track that we don't end up in an infinite loop of RepeatDialogs().
66
+ * @constant A string key representing the repeated IDs path (`'turn.repeatedIds'`).
67
+ */
35
68
  TurnPath.repeatedIds = 'turn.repeatedIds';
36
- /// This is a bool which if set means that the turncontext.activity has been consumed by some component in the system.
69
+ /**
70
+ * Indicates whether the turncontext.activity has been consumed by some component in the system.
71
+ * @constant A string key representing the activity processed path (`'turn.activityProcessed'`).
72
+ */
37
73
  TurnPath.activityProcessed = 'turn.activityProcessed';
38
74
  //# sourceMappingURL=turnPath.js.map