event_logs.proto 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  1. // Copyright 2020 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. syntax = "proto3";
  15. package google.actions.sdk.v2;
  16. import "google/actions/sdk/v2/conversation/intent.proto";
  17. import "google/actions/sdk/v2/conversation/prompt/prompt.proto";
  18. import "google/actions/sdk/v2/conversation/scene.proto";
  19. import "google/protobuf/struct.proto";
  20. import "google/protobuf/timestamp.proto";
  21. import "google/rpc/status.proto";
  22. option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2;sdk";
  23. option java_multiple_files = true;
  24. option java_outer_classname = "EventLogsProto";
  25. option java_package = "com.google.actions.sdk.v2";
  26. // Contains information about execution event which happened during processing
  27. // Actions Builder conversation request. For an overview of the stages involved
  28. // in a conversation request, see
  29. // https://developers.google.com/assistant/conversational/actions.
  30. message ExecutionEvent {
  31. // Timestamp when the event happened.
  32. google.protobuf.Timestamp event_time = 1;
  33. // State of the execution during this event.
  34. ExecutionState execution_state = 2;
  35. // Resulting status of particular execution step.
  36. google.rpc.Status status = 3;
  37. // Detailed information specific to different of events that may be involved
  38. // in processing a conversation round. The field set here defines the type of
  39. // this event.
  40. oneof EventData {
  41. // User input handling event.
  42. UserConversationInput user_input = 4;
  43. // Intent matching event.
  44. IntentMatch intent_match = 5;
  45. // Condition evaluation event.
  46. ConditionsEvaluated conditions_evaluated = 6;
  47. // OnSceneEnter execution event.
  48. OnSceneEnter on_scene_enter = 7;
  49. // Webhook request dispatch event.
  50. WebhookRequest webhook_request = 8;
  51. // Webhook response receipt event.
  52. WebhookResponse webhook_response = 9;
  53. // Webhook-initiated transition event.
  54. WebhookInitiatedTransition webhook_initiated_transition = 10;
  55. // Slot matching event.
  56. SlotMatch slot_match = 11;
  57. // Slot requesting event.
  58. SlotRequested slot_requested = 12;
  59. // Slot validation event.
  60. SlotValidated slot_validated = 13;
  61. // Form filling event.
  62. FormFilled form_filled = 14;
  63. // Waiting-for-user-input event.
  64. WaitingForUserInput waiting_user_input = 15;
  65. // End-of-conversation event.
  66. EndConversation end_conversation = 16;
  67. }
  68. // List of warnings generated during execution of this Event. Warnings are
  69. // tips for the developer discovered during the conversation request. These
  70. // are usually non-critical and do not halt the execution of the request. For
  71. // example, a warnings might be generated when webhook tries to override a
  72. // custom Type which does not exist. Errors are reported as a failed status
  73. // code, but warnings can be present even when the status is OK.
  74. repeated string warning_messages = 17;
  75. }
  76. // Current state of the execution.
  77. message ExecutionState {
  78. // ID of the scene which is currently active.
  79. string current_scene_id = 1;
  80. // State of the session storage:
  81. // https://developers.google.com/assistant/conversational/storage-session
  82. google.protobuf.Struct session_storage = 2;
  83. // State of the slots filling, if applicable:
  84. // https://developers.google.com/assistant/conversational/scenes#slot_filling
  85. Slots slots = 5;
  86. // Prompt queue:
  87. // https://developers.google.com/assistant/conversational/prompts
  88. repeated google.actions.sdk.v2.conversation.Prompt prompt_queue = 7;
  89. // State of the user storage:
  90. // https://developers.google.com/assistant/conversational/storage-user
  91. google.protobuf.Struct user_storage = 6;
  92. // State of the home storage:
  93. // https://developers.google.com/assistant/conversational/storage-home
  94. google.protobuf.Struct household_storage = 8;
  95. }
  96. // Represents the current state of a the scene's slots.
  97. message Slots {
  98. // The current status of slot filling.
  99. google.actions.sdk.v2.conversation.SlotFillingStatus status = 2;
  100. // The slots associated with the current scene.
  101. map<string, google.actions.sdk.v2.conversation.Slot> slots = 3;
  102. }
  103. // Information related to user input.
  104. message UserConversationInput {
  105. // Type of user input. E.g. keyboard, voice, touch, etc.
  106. string type = 1;
  107. // Original text input from the user.
  108. string original_query = 2;
  109. }
  110. // Information about triggered intent match (global or within a scene):
  111. // https://developers.google.com/assistant/conversational/intents
  112. message IntentMatch {
  113. // Intent id which triggered this interaction.
  114. string intent_id = 1;
  115. // Parameters of intent which triggered this interaction.
  116. map<string, google.actions.sdk.v2.conversation.IntentParameterValue> intent_parameters = 5;
  117. // Name of the handler attached to this interaction.
  118. string handler = 3;
  119. // Scene to which this interaction leads to.
  120. string next_scene_id = 4;
  121. }
  122. // Results of conditions evaluation:
  123. // https://developers.google.com/assistant/conversational/scenes#conditions
  124. message ConditionsEvaluated {
  125. // List of conditions which were evaluated to 'false'.
  126. repeated Condition failed_conditions = 1;
  127. // The first condition which was evaluated to 'true', if any.
  128. Condition success_condition = 2;
  129. }
  130. // Evaluated condition.
  131. message Condition {
  132. // Expression specified in this condition.
  133. string expression = 1;
  134. // Handler name specified in evaluated condition.
  135. string handler = 2;
  136. // Destination scene specified in evaluated condition.
  137. string next_scene_id = 3;
  138. }
  139. // Information about execution of onSceneEnter stage:
  140. // https://developers.google.com/assistant/conversational/scenes#on_enter
  141. message OnSceneEnter {
  142. // Handler name specified in onSceneEnter event.
  143. string handler = 1;
  144. }
  145. // Event triggered by destination scene returned from webhook:
  146. // https://developers.google.com/assistant/conversational/webhooks#transition_scenes
  147. message WebhookInitiatedTransition {
  148. // ID of the scene the transition is leading to.
  149. string next_scene_id = 1;
  150. }
  151. // Information about a request dispatched to the Action webhook:
  152. // https://developers.google.com/assistant/conversational/webhooks#payloads
  153. message WebhookRequest {
  154. // Payload of the webhook request.
  155. string request_json = 1;
  156. }
  157. // Information about a response received from the Action webhook:
  158. // https://developers.google.com/assistant/conversational/webhooks#payloads
  159. message WebhookResponse {
  160. // Payload of the webhook response.
  161. string response_json = 1;
  162. }
  163. // Information about matched slot(s):
  164. // https://developers.google.com/assistant/conversational/scenes#slot_filling
  165. message SlotMatch {
  166. // Parameters extracted by NLU from user input.
  167. map<string, google.actions.sdk.v2.conversation.IntentParameterValue> nlu_parameters = 2;
  168. }
  169. // Information about currently requested slot:
  170. // https://developers.google.com/assistant/conversational/scenes#slot_filling
  171. message SlotRequested {
  172. // Name of the requested slot.
  173. string slot = 1;
  174. // Slot prompt.
  175. google.actions.sdk.v2.conversation.Prompt prompt = 3;
  176. }
  177. // Event which happens after webhook validation was finished for slot(s):
  178. // https://developers.google.com/assistant/conversational/scenes#slot_filling
  179. message SlotValidated {
  180. }
  181. // Event which happens when form is fully filled:
  182. // https://developers.google.com/assistant/conversational/scenes#slot_filling
  183. message FormFilled {
  184. }
  185. // Event which happens when system needs user input:
  186. // https://developers.google.com/assistant/conversational/scenes#input
  187. message WaitingForUserInput {
  188. }
  189. // Event which informs that conversation with agent was ended.
  190. message EndConversation {
  191. }