@microsoft/agents-hosting 1.5.0-beta.10.gc9dfbe84d2 → 1.5.0-beta.12.ga9a2b23c19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/package.json +2 -2
- package/dist/src/app/agentApplication.d.ts +14 -0
- package/dist/src/app/agentApplication.js +31 -2
- package/dist/src/app/agentApplication.js.map +1 -1
- package/dist/src/app/agentApplicationBuilder.d.ts +7 -0
- package/dist/src/app/agentApplicationBuilder.js +9 -0
- package/dist/src/app/agentApplicationBuilder.js.map +1 -1
- package/dist/src/app/agentApplicationOptions.d.ts +6 -0
- package/dist/src/app/index.d.ts +1 -0
- package/dist/src/app/index.js +1 -0
- package/dist/src/app/index.js.map +1 -1
- package/dist/src/app/proactive/conversation.d.ts +43 -0
- package/dist/src/app/proactive/conversation.js +67 -0
- package/dist/src/app/proactive/conversation.js.map +1 -0
- package/dist/src/app/proactive/conversationBuilder.d.ts +54 -0
- package/dist/src/app/proactive/conversationBuilder.js +110 -0
- package/dist/src/app/proactive/conversationBuilder.js.map +1 -0
- package/dist/src/app/proactive/conversationReferenceBuilder.d.ts +68 -0
- package/dist/src/app/proactive/conversationReferenceBuilder.js +125 -0
- package/dist/src/app/proactive/conversationReferenceBuilder.js.map +1 -0
- package/dist/src/app/proactive/createConversationOptions.d.ts +30 -0
- package/dist/src/app/proactive/createConversationOptions.js +10 -0
- package/dist/src/app/proactive/createConversationOptions.js.map +1 -0
- package/dist/src/app/proactive/createConversationOptionsBuilder.d.ts +69 -0
- package/dist/src/app/proactive/createConversationOptionsBuilder.js +141 -0
- package/dist/src/app/proactive/createConversationOptionsBuilder.js.map +1 -0
- package/dist/src/app/proactive/index.d.ts +7 -0
- package/dist/src/app/proactive/index.js +26 -0
- package/dist/src/app/proactive/index.js.map +1 -0
- package/dist/src/app/proactive/proactive.d.ts +248 -0
- package/dist/src/app/proactive/proactive.js +271 -0
- package/dist/src/app/proactive/proactive.js.map +1 -0
- package/dist/src/app/proactive/proactiveOptions.d.ts +19 -0
- package/dist/src/app/proactive/proactiveOptions.js +5 -0
- package/dist/src/app/proactive/proactiveOptions.js.map +1 -0
- package/dist/src/errorHelper.js +94 -0
- package/dist/src/errorHelper.js.map +1 -1
- package/package.json +2 -2
- package/src/app/agentApplication.ts +33 -0
- package/src/app/agentApplicationBuilder.ts +11 -0
- package/src/app/agentApplicationOptions.ts +7 -0
- package/src/app/index.ts +1 -0
- package/src/app/proactive/conversation.ts +87 -0
- package/src/app/proactive/conversationBuilder.ts +139 -0
- package/src/app/proactive/conversationReferenceBuilder.ts +161 -0
- package/src/app/proactive/createConversationOptions.ts +35 -0
- package/src/app/proactive/createConversationOptionsBuilder.ts +181 -0
- package/src/app/proactive/index.ts +10 -0
- package/src/app/proactive/proactive.ts +481 -0
- package/src/app/proactive/proactiveOptions.ts +24 -0
- package/src/errorHelper.ts +108 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
|
|
4
|
+
import type { Storage } from '../../storage/storage'
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Configuration for the proactive messaging subsystem.
|
|
8
|
+
*/
|
|
9
|
+
export interface ProactiveOptions {
|
|
10
|
+
/**
|
|
11
|
+
* Storage backend for persisting conversation references.
|
|
12
|
+
*
|
|
13
|
+
* If omitted, falls back to `AgentApplicationOptions.storage`.
|
|
14
|
+
* A warning is logged when the fallback is used.
|
|
15
|
+
* Throws at initialization time if neither is configured.
|
|
16
|
+
*/
|
|
17
|
+
storage?: Storage
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* When `true` (default), `continueConversation()` throws if any requested
|
|
21
|
+
* token handler's user has not previously signed in.
|
|
22
|
+
*/
|
|
23
|
+
failOnUnsignedInConnections?: boolean
|
|
24
|
+
}
|
package/src/errorHelper.ts
CHANGED
|
@@ -660,6 +660,114 @@ export const Errors: { [key: string]: AgentErrorDefinition } = {
|
|
|
660
660
|
description: 'Invalid action value: {error}'
|
|
661
661
|
},
|
|
662
662
|
|
|
663
|
+
// ============================================================================
|
|
664
|
+
// Proactive Messaging Errors (-120740 to -120799)
|
|
665
|
+
// ============================================================================
|
|
666
|
+
|
|
667
|
+
/**
|
|
668
|
+
* Error thrown when Application.proactive is accessed but no storage was configured.
|
|
669
|
+
*/
|
|
670
|
+
ProactivePropertyUnavailable: {
|
|
671
|
+
code: -120740,
|
|
672
|
+
description: 'The Application.proactive property is unavailable because no storage was configured. Set options.storage or options.proactive.storage.'
|
|
673
|
+
},
|
|
674
|
+
|
|
675
|
+
/**
|
|
676
|
+
* Error thrown when a proactive storage operation is attempted without a storage backend.
|
|
677
|
+
*/
|
|
678
|
+
ProactiveStorageRequired: {
|
|
679
|
+
code: -120741,
|
|
680
|
+
description: 'This proactive operation requires a storage backend. Set options.storage or options.proactive.storage.'
|
|
681
|
+
},
|
|
682
|
+
|
|
683
|
+
/**
|
|
684
|
+
* Error thrown when a conversation is not found in proactive storage.
|
|
685
|
+
*/
|
|
686
|
+
ProactiveConversationNotFound: {
|
|
687
|
+
code: -120742,
|
|
688
|
+
description: "Conversation '{conversationId}' was not found in proactive storage."
|
|
689
|
+
},
|
|
690
|
+
|
|
691
|
+
/**
|
|
692
|
+
* Error thrown when sendActivity does not receive a ResourceResponse from the adapter.
|
|
693
|
+
*/
|
|
694
|
+
ProactiveSendActivityNoResponse: {
|
|
695
|
+
code: -120743,
|
|
696
|
+
description: 'sendActivity: adapter did not return a ResourceResponse.'
|
|
697
|
+
},
|
|
698
|
+
|
|
699
|
+
/**
|
|
700
|
+
* Error thrown when not all token handlers have a signed-in user for proactive continuation.
|
|
701
|
+
*/
|
|
702
|
+
ProactiveNotAllTokensAcquired: {
|
|
703
|
+
code: -120744,
|
|
704
|
+
description: 'Not all token handlers have a signed-in user.'
|
|
705
|
+
},
|
|
706
|
+
|
|
707
|
+
/**
|
|
708
|
+
* Error thrown when createConversation is called without any members.
|
|
709
|
+
*/
|
|
710
|
+
ProactiveMembersRequired: {
|
|
711
|
+
code: -120745,
|
|
712
|
+
description: 'createConversation: at least one member must be specified in parameters.members.'
|
|
713
|
+
},
|
|
714
|
+
|
|
715
|
+
/**
|
|
716
|
+
* Error thrown when the adapter passed to createConversation does not support createConversationAsync.
|
|
717
|
+
*/
|
|
718
|
+
ProactiveCloudAdapterRequired: {
|
|
719
|
+
code: -120746,
|
|
720
|
+
description: 'createConversation requires a CloudAdapter. The provided adapter does not implement createConversationAsync().'
|
|
721
|
+
},
|
|
722
|
+
|
|
723
|
+
/**
|
|
724
|
+
* Error thrown when createConversationAsync completes without invoking its callback.
|
|
725
|
+
*/
|
|
726
|
+
ProactiveCallbackNotInvoked: {
|
|
727
|
+
code: -120747,
|
|
728
|
+
description: 'createConversation: createConversationAsync completed without invoking its callback.'
|
|
729
|
+
},
|
|
730
|
+
|
|
731
|
+
/**
|
|
732
|
+
* Error thrown when a Conversation reference is missing conversation.id.
|
|
733
|
+
*/
|
|
734
|
+
ConversationInvalidId: {
|
|
735
|
+
code: -120748,
|
|
736
|
+
description: 'Conversation is invalid: reference.conversation.id is required.'
|
|
737
|
+
},
|
|
738
|
+
|
|
739
|
+
/**
|
|
740
|
+
* Error thrown when a Conversation reference is missing serviceUrl.
|
|
741
|
+
*/
|
|
742
|
+
ConversationInvalidServiceUrl: {
|
|
743
|
+
code: -120749,
|
|
744
|
+
description: 'Conversation is invalid: reference.serviceUrl is required.'
|
|
745
|
+
},
|
|
746
|
+
|
|
747
|
+
/**
|
|
748
|
+
* Error thrown when a Conversation reference is missing claims.aud.
|
|
749
|
+
*/
|
|
750
|
+
ConversationInvalidAud: {
|
|
751
|
+
code: -120750,
|
|
752
|
+
description: 'Conversation is invalid: claims.aud (agent client ID) is required.'
|
|
753
|
+
},
|
|
754
|
+
|
|
755
|
+
/**
|
|
756
|
+
* Error thrown when CreateConversationOptionsBuilder.build() is called without any members.
|
|
757
|
+
*/
|
|
758
|
+
CreateConversationBuilderMembersRequired: {
|
|
759
|
+
code: -120751,
|
|
760
|
+
description: 'CreateConversationOptionsBuilder: at least one members entry must be added via withUser().'
|
|
761
|
+
},
|
|
762
|
+
|
|
763
|
+
/**
|
|
764
|
+
* Error thrown when a proactive operation that requires TurnState load/save is called without app storage.
|
|
765
|
+
*/
|
|
766
|
+
ProactiveAppStorageRequired: {
|
|
767
|
+
code: -120752,
|
|
768
|
+
description: 'This proactive operation requires app storage to load and save TurnState. Set options.storage on AgentApplication.'
|
|
769
|
+
},
|
|
770
|
+
|
|
663
771
|
// ============================================================================
|
|
664
772
|
// General Errors (-120990)
|
|
665
773
|
// ============================================================================
|