@microsoft/agents-a365-observability 0.1.0-preview.95 → 0.2.0-preview.3

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 (243) hide show
  1. package/dist/cjs/ObservabilityBuilder.d.ts +24 -1
  2. package/dist/cjs/ObservabilityBuilder.d.ts.map +1 -1
  3. package/dist/cjs/ObservabilityBuilder.js +39 -12
  4. package/dist/cjs/ObservabilityBuilder.js.map +1 -1
  5. package/dist/cjs/ObservabilityManager.d.ts.map +1 -1
  6. package/dist/cjs/ObservabilityManager.js +3 -0
  7. package/dist/cjs/ObservabilityManager.js.map +1 -1
  8. package/dist/cjs/configuration/ObservabilityConfiguration.d.ts +19 -0
  9. package/dist/cjs/configuration/ObservabilityConfiguration.d.ts.map +1 -0
  10. package/dist/cjs/configuration/ObservabilityConfiguration.js +60 -0
  11. package/dist/cjs/configuration/ObservabilityConfiguration.js.map +1 -0
  12. package/dist/cjs/configuration/ObservabilityConfigurationOptions.d.ts +58 -0
  13. package/dist/cjs/configuration/ObservabilityConfigurationOptions.d.ts.map +1 -0
  14. package/dist/cjs/configuration/ObservabilityConfigurationOptions.js +5 -0
  15. package/dist/cjs/configuration/ObservabilityConfigurationOptions.js.map +1 -0
  16. package/dist/cjs/configuration/PerRequestSpanProcessorConfiguration.d.ts +22 -0
  17. package/dist/cjs/configuration/PerRequestSpanProcessorConfiguration.d.ts.map +1 -0
  18. package/dist/cjs/configuration/PerRequestSpanProcessorConfiguration.js +73 -0
  19. package/dist/cjs/configuration/PerRequestSpanProcessorConfiguration.js.map +1 -0
  20. package/dist/cjs/configuration/PerRequestSpanProcessorConfigurationOptions.d.ts +71 -0
  21. package/dist/cjs/configuration/PerRequestSpanProcessorConfigurationOptions.d.ts.map +1 -0
  22. package/dist/cjs/configuration/PerRequestSpanProcessorConfigurationOptions.js +5 -0
  23. package/dist/cjs/configuration/PerRequestSpanProcessorConfigurationOptions.js.map +1 -0
  24. package/dist/cjs/configuration/index.d.ts +16 -0
  25. package/dist/cjs/configuration/index.d.ts.map +1 -0
  26. package/dist/cjs/configuration/index.js +35 -0
  27. package/dist/cjs/configuration/index.js.map +1 -0
  28. package/dist/cjs/index.d.ts +11 -3
  29. package/dist/cjs/index.d.ts.map +1 -1
  30. package/dist/cjs/index.js +45 -5
  31. package/dist/cjs/index.js.map +1 -1
  32. package/dist/cjs/internal/PerRequestProcessorInternalOverrides.d.ts +4 -0
  33. package/dist/cjs/internal/PerRequestProcessorInternalOverrides.d.ts.map +1 -0
  34. package/dist/cjs/internal/PerRequestProcessorInternalOverrides.js +15 -0
  35. package/dist/cjs/internal/PerRequestProcessorInternalOverrides.js.map +1 -0
  36. package/dist/cjs/tracing/PerRequestSpanProcessor.d.ts +10 -3
  37. package/dist/cjs/tracing/PerRequestSpanProcessor.d.ts.map +1 -1
  38. package/dist/cjs/tracing/PerRequestSpanProcessor.js +14 -23
  39. package/dist/cjs/tracing/PerRequestSpanProcessor.js.map +1 -1
  40. package/dist/cjs/tracing/constants.d.ts +35 -35
  41. package/dist/cjs/tracing/constants.d.ts.map +1 -1
  42. package/dist/cjs/tracing/constants.js +42 -40
  43. package/dist/cjs/tracing/constants.js.map +1 -1
  44. package/dist/cjs/tracing/context/parent-span-context.d.ts +11 -2
  45. package/dist/cjs/tracing/context/parent-span-context.d.ts.map +1 -1
  46. package/dist/cjs/tracing/context/parent-span-context.js +10 -5
  47. package/dist/cjs/tracing/context/parent-span-context.js.map +1 -1
  48. package/dist/cjs/tracing/context/token-context.d.ts +14 -0
  49. package/dist/cjs/tracing/context/token-context.d.ts.map +1 -1
  50. package/dist/cjs/tracing/context/token-context.js +35 -2
  51. package/dist/cjs/tracing/context/token-context.js.map +1 -1
  52. package/dist/cjs/tracing/context/trace-context-propagation.d.ts +68 -0
  53. package/dist/cjs/tracing/context/trace-context-propagation.d.ts.map +1 -0
  54. package/dist/cjs/tracing/context/trace-context-propagation.js +85 -0
  55. package/dist/cjs/tracing/context/trace-context-propagation.js.map +1 -0
  56. package/dist/cjs/tracing/contracts.d.ts +229 -62
  57. package/dist/cjs/tracing/contracts.d.ts.map +1 -1
  58. package/dist/cjs/tracing/contracts.js +39 -18
  59. package/dist/cjs/tracing/contracts.js.map +1 -1
  60. package/dist/cjs/tracing/exporter/Agent365Exporter.d.ts +9 -4
  61. package/dist/cjs/tracing/exporter/Agent365Exporter.d.ts.map +1 -1
  62. package/dist/cjs/tracing/exporter/Agent365Exporter.js +53 -46
  63. package/dist/cjs/tracing/exporter/Agent365Exporter.js.map +1 -1
  64. package/dist/cjs/tracing/exporter/Agent365ExporterOptions.d.ts +8 -5
  65. package/dist/cjs/tracing/exporter/Agent365ExporterOptions.d.ts.map +1 -1
  66. package/dist/cjs/tracing/exporter/Agent365ExporterOptions.js +11 -7
  67. package/dist/cjs/tracing/exporter/Agent365ExporterOptions.js.map +1 -1
  68. package/dist/cjs/tracing/exporter/ExporterEventNames.d.ts +20 -0
  69. package/dist/cjs/tracing/exporter/ExporterEventNames.d.ts.map +1 -0
  70. package/dist/cjs/tracing/exporter/ExporterEventNames.js +26 -0
  71. package/dist/cjs/tracing/exporter/ExporterEventNames.js.map +1 -0
  72. package/dist/cjs/tracing/exporter/utils.d.ts +24 -11
  73. package/dist/cjs/tracing/exporter/utils.d.ts.map +1 -1
  74. package/dist/cjs/tracing/exporter/utils.js +357 -34
  75. package/dist/cjs/tracing/exporter/utils.js.map +1 -1
  76. package/dist/cjs/tracing/message-utils.d.ts +36 -0
  77. package/dist/cjs/tracing/message-utils.d.ts.map +1 -0
  78. package/dist/cjs/tracing/message-utils.js +90 -0
  79. package/dist/cjs/tracing/message-utils.js.map +1 -0
  80. package/dist/cjs/tracing/middleware/BaggageBuilder.d.ts +32 -44
  81. package/dist/cjs/tracing/middleware/BaggageBuilder.d.ts.map +1 -1
  82. package/dist/cjs/tracing/middleware/BaggageBuilder.js +49 -62
  83. package/dist/cjs/tracing/middleware/BaggageBuilder.js.map +1 -1
  84. package/dist/cjs/tracing/processors/SpanProcessor.d.ts.map +1 -1
  85. package/dist/cjs/tracing/processors/SpanProcessor.js +12 -3
  86. package/dist/cjs/tracing/processors/SpanProcessor.js.map +1 -1
  87. package/dist/cjs/tracing/processors/util.d.ts.map +1 -1
  88. package/dist/cjs/tracing/processors/util.js +16 -22
  89. package/dist/cjs/tracing/processors/util.js.map +1 -1
  90. package/dist/cjs/tracing/scopes/ExecuteToolScope.d.ts +10 -11
  91. package/dist/cjs/tracing/scopes/ExecuteToolScope.d.ts.map +1 -1
  92. package/dist/cjs/tracing/scopes/ExecuteToolScope.js +26 -20
  93. package/dist/cjs/tracing/scopes/ExecuteToolScope.js.map +1 -1
  94. package/dist/cjs/tracing/scopes/InferenceScope.d.ts +20 -24
  95. package/dist/cjs/tracing/scopes/InferenceScope.d.ts.map +1 -1
  96. package/dist/cjs/tracing/scopes/InferenceScope.js +53 -48
  97. package/dist/cjs/tracing/scopes/InferenceScope.js.map +1 -1
  98. package/dist/cjs/tracing/scopes/InvokeAgentScope.d.ts +17 -12
  99. package/dist/cjs/tracing/scopes/InvokeAgentScope.d.ts.map +1 -1
  100. package/dist/cjs/tracing/scopes/InvokeAgentScope.js +55 -54
  101. package/dist/cjs/tracing/scopes/InvokeAgentScope.js.map +1 -1
  102. package/dist/cjs/tracing/scopes/OpenTelemetryScope.d.ts +43 -12
  103. package/dist/cjs/tracing/scopes/OpenTelemetryScope.d.ts.map +1 -1
  104. package/dist/cjs/tracing/scopes/OpenTelemetryScope.js +114 -30
  105. package/dist/cjs/tracing/scopes/OpenTelemetryScope.js.map +1 -1
  106. package/dist/cjs/tracing/scopes/OutputScope.d.ts +33 -0
  107. package/dist/cjs/tracing/scopes/OutputScope.d.ts.map +1 -0
  108. package/dist/cjs/tracing/scopes/OutputScope.js +80 -0
  109. package/dist/cjs/tracing/scopes/OutputScope.js.map +1 -0
  110. package/dist/cjs/tracing/util.d.ts +14 -1
  111. package/dist/cjs/tracing/util.d.ts.map +1 -1
  112. package/dist/cjs/tracing/util.js +38 -7
  113. package/dist/cjs/tracing/util.js.map +1 -1
  114. package/dist/cjs/utils/logging.d.ts +45 -2
  115. package/dist/cjs/utils/logging.d.ts.map +1 -1
  116. package/dist/cjs/utils/logging.js +53 -79
  117. package/dist/cjs/utils/logging.js.map +1 -1
  118. package/dist/cjs/version.d.ts +2 -0
  119. package/dist/cjs/version.d.ts.map +1 -0
  120. package/dist/cjs/version.js +5 -0
  121. package/dist/cjs/version.js.map +1 -0
  122. package/dist/esm/ObservabilityBuilder.d.ts +24 -1
  123. package/dist/esm/ObservabilityBuilder.d.ts.map +1 -1
  124. package/dist/esm/ObservabilityBuilder.js +41 -14
  125. package/dist/esm/ObservabilityBuilder.js.map +1 -1
  126. package/dist/esm/ObservabilityManager.d.ts.map +1 -1
  127. package/dist/esm/ObservabilityManager.js +3 -0
  128. package/dist/esm/ObservabilityManager.js.map +1 -1
  129. package/dist/esm/configuration/ObservabilityConfiguration.d.ts +19 -0
  130. package/dist/esm/configuration/ObservabilityConfiguration.d.ts.map +1 -0
  131. package/dist/esm/configuration/ObservabilityConfiguration.js +56 -0
  132. package/dist/esm/configuration/ObservabilityConfiguration.js.map +1 -0
  133. package/dist/esm/configuration/ObservabilityConfigurationOptions.d.ts +58 -0
  134. package/dist/esm/configuration/ObservabilityConfigurationOptions.d.ts.map +1 -0
  135. package/dist/esm/configuration/ObservabilityConfigurationOptions.js +4 -0
  136. package/dist/esm/configuration/ObservabilityConfigurationOptions.js.map +1 -0
  137. package/dist/esm/configuration/PerRequestSpanProcessorConfiguration.d.ts +22 -0
  138. package/dist/esm/configuration/PerRequestSpanProcessorConfiguration.d.ts.map +1 -0
  139. package/dist/esm/configuration/PerRequestSpanProcessorConfiguration.js +69 -0
  140. package/dist/esm/configuration/PerRequestSpanProcessorConfiguration.js.map +1 -0
  141. package/dist/esm/configuration/PerRequestSpanProcessorConfigurationOptions.d.ts +71 -0
  142. package/dist/esm/configuration/PerRequestSpanProcessorConfigurationOptions.d.ts.map +1 -0
  143. package/dist/esm/configuration/PerRequestSpanProcessorConfigurationOptions.js +4 -0
  144. package/dist/esm/configuration/PerRequestSpanProcessorConfigurationOptions.js.map +1 -0
  145. package/dist/esm/configuration/index.d.ts +16 -0
  146. package/dist/esm/configuration/index.d.ts.map +1 -0
  147. package/dist/esm/configuration/index.js +18 -0
  148. package/dist/esm/configuration/index.js.map +1 -0
  149. package/dist/esm/index.d.ts +11 -3
  150. package/dist/esm/index.d.ts.map +1 -1
  151. package/dist/esm/index.js +17 -5
  152. package/dist/esm/index.js.map +1 -1
  153. package/dist/esm/internal/PerRequestProcessorInternalOverrides.d.ts +4 -0
  154. package/dist/esm/internal/PerRequestProcessorInternalOverrides.d.ts.map +1 -0
  155. package/dist/esm/internal/PerRequestProcessorInternalOverrides.js +11 -0
  156. package/dist/esm/internal/PerRequestProcessorInternalOverrides.js.map +1 -0
  157. package/dist/esm/tracing/PerRequestSpanProcessor.d.ts +10 -3
  158. package/dist/esm/tracing/PerRequestSpanProcessor.d.ts.map +1 -1
  159. package/dist/esm/tracing/PerRequestSpanProcessor.js +14 -23
  160. package/dist/esm/tracing/PerRequestSpanProcessor.js.map +1 -1
  161. package/dist/esm/tracing/constants.d.ts +35 -35
  162. package/dist/esm/tracing/constants.d.ts.map +1 -1
  163. package/dist/esm/tracing/constants.js +42 -40
  164. package/dist/esm/tracing/constants.js.map +1 -1
  165. package/dist/esm/tracing/context/parent-span-context.d.ts +11 -2
  166. package/dist/esm/tracing/context/parent-span-context.d.ts.map +1 -1
  167. package/dist/esm/tracing/context/parent-span-context.js +10 -5
  168. package/dist/esm/tracing/context/parent-span-context.js.map +1 -1
  169. package/dist/esm/tracing/context/token-context.d.ts +14 -0
  170. package/dist/esm/tracing/context/token-context.d.ts.map +1 -1
  171. package/dist/esm/tracing/context/token-context.js +34 -2
  172. package/dist/esm/tracing/context/token-context.js.map +1 -1
  173. package/dist/esm/tracing/context/trace-context-propagation.d.ts +68 -0
  174. package/dist/esm/tracing/context/trace-context-propagation.d.ts.map +1 -0
  175. package/dist/esm/tracing/context/trace-context-propagation.js +79 -0
  176. package/dist/esm/tracing/context/trace-context-propagation.js.map +1 -0
  177. package/dist/esm/tracing/contracts.d.ts +229 -62
  178. package/dist/esm/tracing/contracts.d.ts.map +1 -1
  179. package/dist/esm/tracing/contracts.js +38 -17
  180. package/dist/esm/tracing/contracts.js.map +1 -1
  181. package/dist/esm/tracing/exporter/Agent365Exporter.d.ts +9 -4
  182. package/dist/esm/tracing/exporter/Agent365Exporter.d.ts.map +1 -1
  183. package/dist/esm/tracing/exporter/Agent365Exporter.js +54 -47
  184. package/dist/esm/tracing/exporter/Agent365Exporter.js.map +1 -1
  185. package/dist/esm/tracing/exporter/Agent365ExporterOptions.d.ts +8 -5
  186. package/dist/esm/tracing/exporter/Agent365ExporterOptions.d.ts.map +1 -1
  187. package/dist/esm/tracing/exporter/Agent365ExporterOptions.js +11 -7
  188. package/dist/esm/tracing/exporter/Agent365ExporterOptions.js.map +1 -1
  189. package/dist/esm/tracing/exporter/ExporterEventNames.d.ts +20 -0
  190. package/dist/esm/tracing/exporter/ExporterEventNames.d.ts.map +1 -0
  191. package/dist/esm/tracing/exporter/ExporterEventNames.js +23 -0
  192. package/dist/esm/tracing/exporter/ExporterEventNames.js.map +1 -0
  193. package/dist/esm/tracing/exporter/utils.d.ts +24 -11
  194. package/dist/esm/tracing/exporter/utils.d.ts.map +1 -1
  195. package/dist/esm/tracing/exporter/utils.js +355 -33
  196. package/dist/esm/tracing/exporter/utils.js.map +1 -1
  197. package/dist/esm/tracing/message-utils.d.ts +36 -0
  198. package/dist/esm/tracing/message-utils.d.ts.map +1 -0
  199. package/dist/esm/tracing/message-utils.js +82 -0
  200. package/dist/esm/tracing/message-utils.js.map +1 -0
  201. package/dist/esm/tracing/middleware/BaggageBuilder.d.ts +32 -44
  202. package/dist/esm/tracing/middleware/BaggageBuilder.d.ts.map +1 -1
  203. package/dist/esm/tracing/middleware/BaggageBuilder.js +49 -62
  204. package/dist/esm/tracing/middleware/BaggageBuilder.js.map +1 -1
  205. package/dist/esm/tracing/processors/SpanProcessor.d.ts.map +1 -1
  206. package/dist/esm/tracing/processors/SpanProcessor.js +12 -3
  207. package/dist/esm/tracing/processors/SpanProcessor.js.map +1 -1
  208. package/dist/esm/tracing/processors/util.d.ts.map +1 -1
  209. package/dist/esm/tracing/processors/util.js +16 -22
  210. package/dist/esm/tracing/processors/util.js.map +1 -1
  211. package/dist/esm/tracing/scopes/ExecuteToolScope.d.ts +10 -11
  212. package/dist/esm/tracing/scopes/ExecuteToolScope.d.ts.map +1 -1
  213. package/dist/esm/tracing/scopes/ExecuteToolScope.js +26 -20
  214. package/dist/esm/tracing/scopes/ExecuteToolScope.js.map +1 -1
  215. package/dist/esm/tracing/scopes/InferenceScope.d.ts +20 -24
  216. package/dist/esm/tracing/scopes/InferenceScope.d.ts.map +1 -1
  217. package/dist/esm/tracing/scopes/InferenceScope.js +53 -48
  218. package/dist/esm/tracing/scopes/InferenceScope.js.map +1 -1
  219. package/dist/esm/tracing/scopes/InvokeAgentScope.d.ts +17 -12
  220. package/dist/esm/tracing/scopes/InvokeAgentScope.d.ts.map +1 -1
  221. package/dist/esm/tracing/scopes/InvokeAgentScope.js +55 -54
  222. package/dist/esm/tracing/scopes/InvokeAgentScope.js.map +1 -1
  223. package/dist/esm/tracing/scopes/OpenTelemetryScope.d.ts +43 -12
  224. package/dist/esm/tracing/scopes/OpenTelemetryScope.d.ts.map +1 -1
  225. package/dist/esm/tracing/scopes/OpenTelemetryScope.js +115 -31
  226. package/dist/esm/tracing/scopes/OpenTelemetryScope.js.map +1 -1
  227. package/dist/esm/tracing/scopes/OutputScope.d.ts +33 -0
  228. package/dist/esm/tracing/scopes/OutputScope.d.ts.map +1 -0
  229. package/dist/esm/tracing/scopes/OutputScope.js +76 -0
  230. package/dist/esm/tracing/scopes/OutputScope.js.map +1 -0
  231. package/dist/esm/tracing/util.d.ts +14 -1
  232. package/dist/esm/tracing/util.d.ts.map +1 -1
  233. package/dist/esm/tracing/util.js +37 -7
  234. package/dist/esm/tracing/util.js.map +1 -1
  235. package/dist/esm/utils/logging.d.ts +45 -2
  236. package/dist/esm/utils/logging.d.ts.map +1 -1
  237. package/dist/esm/utils/logging.js +52 -79
  238. package/dist/esm/utils/logging.js.map +1 -1
  239. package/dist/esm/version.d.ts +2 -0
  240. package/dist/esm/version.d.ts.map +1 -0
  241. package/dist/esm/version.js +2 -0
  242. package/dist/esm/version.js.map +1 -0
  243. package/package.json +9 -9
@@ -1,16 +1,5 @@
1
- /**
2
- * Represents different types of agent invocations
3
- */
4
- export declare enum ExecutionType {
5
- /** Direct human-to-agent invocation (e.g., through UI, API call) */
6
- HumanToAgent = "HumanToAgent",
7
- /** Agent-to-agent invocation (e.g., one agent calling another) */
8
- Agent2Agent = "Agent2Agent",
9
- /** Event-driven agent invocation (e.g., scheduled, webhook, message queue) */
10
- EventToAgent = "EventToAgent",
11
- /** Unknown or unspecified invocation type */
12
- Unknown = "Unknown"
13
- }
1
+ import type { SpanKind, TimeInput, Link } from '@opentelemetry/api';
2
+ import type { ParentContext } from './context/trace-context-propagation';
14
3
  /**
15
4
  * Represents different roles that can invoke an agent
16
5
  */
@@ -33,39 +22,33 @@ export declare enum InferenceOperationType {
33
22
  GENERATE_CONTENT = "GenerateContent"
34
23
  }
35
24
  /**
36
- * Represents metadata about the source of an invocation
25
+ * Represents channel for an invocation
37
26
  */
38
- export interface SourceMetadata {
39
- /** Unique identifier for the source (e.g., agent ID, user ID, system component ID) */
27
+ export interface Channel {
28
+ /** Unique identifier for the channel (e.g., Teams channel ID, Slack workspace ID) */
40
29
  id?: string;
41
- /** Human-readable name of the source */
30
+ /** Human-readable name of the channel (e.g., "Teams", "Slack", "web") */
42
31
  name?: string;
43
- /** Optional icon identifier or URL for visual representation of the source */
32
+ /** Optional icon identifier or URL for visual representation of the channel */
44
33
  iconUri?: string;
45
- /** The role of the source invoking the agent */
34
+ /** The role of the entity invoking through this channel */
46
35
  role?: InvocationRole;
47
- /** Optional description providing additional context about the source */
36
+ /** Optional description or link providing additional context about the channel */
48
37
  description?: string;
49
38
  }
50
39
  /**
51
- * Represents a request to an agent with telemetry context
40
+ * Represents a request with telemetry context.
41
+ * Used across all scope types for channel and conversation tracking.
52
42
  */
53
- export interface AgentRequest {
54
- /** The content of the request */
55
- content?: string;
56
- /** The type of invocation (how the agent was called) */
57
- executionType?: ExecutionType;
43
+ export interface Request {
44
+ /** The content of the request. */
45
+ content?: InputMessagesParam;
58
46
  /** Optional session identifier for grouping related requests */
59
47
  sessionId?: string;
60
- /** Optional metadata about the source of the invocation */
61
- sourceMetadata?: SourceMetadata;
62
- }
63
- /**
64
- * Details about a tenant
65
- */
66
- export interface TenantDetails {
67
- /** The unique identifier for the tenant */
68
- tenantId: string;
48
+ /** Optional channel for the invocation */
49
+ channel?: Channel;
50
+ /** Optional conversation identifier */
51
+ conversationId?: string;
69
52
  }
70
53
  /**
71
54
  * Details about an AI agent
@@ -73,12 +56,8 @@ export interface TenantDetails {
73
56
  export interface AgentDetails {
74
57
  /** The unique identifier for the AI agent */
75
58
  agentId: string;
76
- /** The identifier for the conversation or session */
77
- conversationId?: string;
78
59
  /** The human-readable name of the AI agent */
79
60
  agentName?: string;
80
- /** Optional type of the AI agent */
81
- agentType?: string;
82
61
  /** A description of the AI agent's purpose or capabilities */
83
62
  agentDescription?: string;
84
63
  /** Optional icon identifier or URL for visual representation of the agent */
@@ -87,14 +66,16 @@ export interface AgentDetails {
87
66
  platformId?: string;
88
67
  /** The agent user ID (AUID) */
89
68
  agentAUID?: string;
90
- /** The agent user principal name (UPN) */
91
- agentUPN?: string;
69
+ /** The agent email address */
70
+ agentEmail?: string;
92
71
  /** The agent blueprint/application ID */
93
72
  agentBlueprintId?: string;
94
73
  /** The tenant ID for the agent */
95
74
  tenantId?: string;
96
- /** The client IP address for the agent user */
97
- agentClientIP?: string;
75
+ /** The provider name (e.g., az.ai.agent365, openai, anthropic) */
76
+ providerName?: string;
77
+ /** The version of the agent (e.g., '1.0.0', '2025-05-01') */
78
+ agentVersion?: string;
98
79
  }
99
80
  /**
100
81
  * Details of a tool call made by an agent
@@ -102,8 +83,8 @@ export interface AgentDetails {
102
83
  export interface ToolCallDetails {
103
84
  /** The name of the tool being executed */
104
85
  toolName: string;
105
- /** Tool arguments/parameters */
106
- arguments?: string;
86
+ /** Tool arguments/parameters. Objects are serialized to JSON automatically. */
87
+ arguments?: Record<string, unknown> | string;
107
88
  /** The unique identifier for the tool call */
108
89
  toolCallId?: string;
109
90
  /** Optional description of the tool or its purpose */
@@ -114,22 +95,40 @@ export interface ToolCallDetails {
114
95
  endpoint?: ServiceEndpoint;
115
96
  }
116
97
  /**
117
- * Details about a caller
98
+ * Details about the human user caller.
118
99
  */
119
- export interface CallerDetails {
100
+ export interface UserDetails {
120
101
  /** The unique identifier for the caller */
121
- callerId?: string;
122
- /** The user principal name (UPN) of the caller */
123
- callerUpn?: string;
102
+ userId?: string;
103
+ /** The email address of the caller */
104
+ userEmail?: string;
124
105
  /** The display name of the caller */
125
- callerName?: string;
126
- /** The user ID of the caller */
127
- callerUserId?: string;
106
+ userName?: string;
128
107
  /** The tenant ID of the caller */
129
108
  tenantId?: string;
130
109
  /** The client IP address for the caller */
131
110
  callerClientIp?: string;
132
111
  }
112
+ /**
113
+ * Caller details for scope creation.
114
+ * Supports human callers, agent callers, or both (A2A with a human in the chain).
115
+ *
116
+ * **Migration note:** In v1 the name `CallerDetails` referred to human caller
117
+ * identity (now {@link UserDetails}). In v2 it was repurposed as a wrapper that
118
+ * groups both human and agent caller information.
119
+ *
120
+ * @see {@link UserDetails} — human caller identity (previously `CallerDetails`)
121
+ * @see CHANGELOG.md — breaking changes section for migration guidance
122
+ */
123
+ export interface CallerDetails {
124
+ /** Optional human caller identity */
125
+ userDetails?: UserDetails;
126
+ /** Optional calling agent identity for A2A (agent-to-agent) scenarios */
127
+ callerAgentDetails?: AgentDetails;
128
+ }
129
+ /**
130
+ * @deprecated Use AgentDetails. EnhancedAgentDetails is now an alias of AgentDetails.
131
+ */
133
132
  export type EnhancedAgentDetails = AgentDetails;
134
133
  /**
135
134
  * Represents an endpoint for agent invocation
@@ -143,18 +142,14 @@ export interface ServiceEndpoint {
143
142
  protocol?: string;
144
143
  }
145
144
  /**
146
- * Details for invoking another agent
145
+ * Details for invoking agent scope.
147
146
  */
148
- export interface InvokeAgentDetails extends AgentDetails {
149
- /** The request payload for the agent invocation */
150
- request?: AgentRequest;
147
+ export interface InvokeAgentScopeDetails {
151
148
  /** The endpoint for the agent invocation */
152
149
  endpoint?: ServiceEndpoint;
153
- /** Session ID for the invocation */
154
- sessionId?: string;
155
150
  }
156
151
  /**
157
- * Details for an inference call matching C# implementation
152
+ * Details for an inference call
158
153
  */
159
154
  export interface InferenceDetails {
160
155
  /** The operation name/type for the inference */
@@ -169,8 +164,10 @@ export interface InferenceDetails {
169
164
  outputTokens?: number;
170
165
  /** Array of finish reasons */
171
166
  finishReasons?: string[];
172
- /** Response ID from the model provider */
173
- responseId?: string;
167
+ /** The thought process used by the agent */
168
+ thoughtProcess?: string;
169
+ /** The endpoint for the inference call */
170
+ endpoint?: ServiceEndpoint;
174
171
  }
175
172
  /**
176
173
  * Details for recording the response from an inference call
@@ -187,4 +184,174 @@ export interface InferenceResponse {
187
184
  /** Number of output tokens generated */
188
185
  outputTokens?: number;
189
186
  }
187
+ /**
188
+ * Represents a response containing output messages from an agent.
189
+ * Used with OutputScope for output message tracing.
190
+ * Accepts plain strings, structured OTEL OutputMessage objects, or a raw dict
191
+ * (treated as a tool call result per OTEL spec).
192
+ */
193
+ export interface OutputResponse {
194
+ /** The output messages from the agent */
195
+ messages: ResponseMessagesParam;
196
+ }
197
+ /**
198
+ * Span configuration details for scope creation.
199
+ * Groups OpenTelemetry span options into a single object so the scope
200
+ * method signature remains stable as new options are added.
201
+ */
202
+ export interface SpanDetails {
203
+ /** Optional parent context for cross-async-boundary tracing.
204
+ * Accepts a ParentSpanRef (manual traceId/spanId) or an OTel Context
205
+ * (e.g. from extractContextFromHeaders). */
206
+ parentContext?: ParentContext;
207
+ /** Optional explicit start time (ms epoch, Date, or HrTime). */
208
+ startTime?: TimeInput;
209
+ /** Optional explicit end time (ms epoch, Date, or HrTime). */
210
+ endTime?: TimeInput;
211
+ /** Optional span kind override. */
212
+ spanKind?: SpanKind;
213
+ /** Optional span links to associate with this span. */
214
+ spanLinks?: Link[];
215
+ }
216
+ /**
217
+ * Role of a message participant per OTEL gen-ai semantic conventions.
218
+ */
219
+ export declare enum MessageRole {
220
+ SYSTEM = "system",
221
+ USER = "user",
222
+ ASSISTANT = "assistant",
223
+ TOOL = "tool"
224
+ }
225
+ /**
226
+ * Reason a model stopped generating per OTEL gen-ai semantic conventions.
227
+ */
228
+ export declare enum FinishReason {
229
+ STOP = "stop",
230
+ LENGTH = "length",
231
+ CONTENT_FILTER = "content_filter",
232
+ TOOL_CALL = "tool_call",
233
+ ERROR = "error"
234
+ }
235
+ /**
236
+ * Media modality for blob, file, and URI parts.
237
+ */
238
+ export declare enum Modality {
239
+ IMAGE = "image",
240
+ VIDEO = "video",
241
+ AUDIO = "audio"
242
+ }
243
+ /** Plain text content. */
244
+ export interface TextPart {
245
+ type: 'text';
246
+ content: string;
247
+ }
248
+ /** A tool call requested by the model. */
249
+ export interface ToolCallRequestPart {
250
+ type: 'tool_call';
251
+ name: string;
252
+ id?: string;
253
+ arguments?: Record<string, unknown> | unknown[];
254
+ }
255
+ /** Result of a tool call. */
256
+ export interface ToolCallResponsePart {
257
+ type: 'tool_call_response';
258
+ id?: string;
259
+ response?: unknown;
260
+ }
261
+ /** Model reasoning / chain-of-thought content. */
262
+ export interface ReasoningPart {
263
+ type: 'reasoning';
264
+ content: string;
265
+ }
266
+ /** Inline binary data (base64-encoded). */
267
+ export interface BlobPart {
268
+ type: 'blob';
269
+ modality: Modality | string;
270
+ mime_type?: string;
271
+ content: string;
272
+ }
273
+ /** Reference to a pre-uploaded file. */
274
+ export interface FilePart {
275
+ type: 'file';
276
+ modality: Modality | string;
277
+ mime_type?: string;
278
+ file_id: string;
279
+ }
280
+ /** External URI reference. */
281
+ export interface UriPart {
282
+ type: 'uri';
283
+ modality: Modality | string;
284
+ mime_type?: string;
285
+ uri: string;
286
+ }
287
+ /** Extensible server tool call details with a type discriminator. */
288
+ export interface GenericServerToolCall {
289
+ type: string;
290
+ [key: string]: unknown;
291
+ }
292
+ /** Extensible server tool call response with a type discriminator. */
293
+ export interface GenericServerToolCallResponse {
294
+ type: string;
295
+ [key: string]: unknown;
296
+ }
297
+ /** Server-side tool invocation. */
298
+ export interface ServerToolCallPart {
299
+ type: 'server_tool_call';
300
+ name: string;
301
+ id?: string;
302
+ server_tool_call: GenericServerToolCall;
303
+ }
304
+ /** Server-side tool response. */
305
+ export interface ServerToolCallResponsePart {
306
+ type: 'server_tool_call_response';
307
+ id?: string;
308
+ server_tool_call_response: GenericServerToolCallResponse;
309
+ }
310
+ /** Extensible part for custom / future types. */
311
+ export interface GenericPart {
312
+ type: string;
313
+ [key: string]: unknown;
314
+ }
315
+ /**
316
+ * Union of all message part types per OTEL gen-ai semantic conventions.
317
+ *
318
+ * Note: {@link GenericPart} acts as a catch-all for forward compatibility with
319
+ * custom or future part types. Because its `type` is `string` (not a literal),
320
+ * exhaustive `switch`/`case` on `part.type` will not produce compile-time errors
321
+ * for unhandled cases.
322
+ */
323
+ export type MessagePart = TextPart | ToolCallRequestPart | ToolCallResponsePart | ReasoningPart | BlobPart | FilePart | UriPart | ServerToolCallPart | ServerToolCallResponsePart | GenericPart;
324
+ /**
325
+ * An input message sent to a model (OTEL gen-ai semantic conventions).
326
+ */
327
+ export interface ChatMessage {
328
+ role: MessageRole | string;
329
+ parts: MessagePart[];
330
+ name?: string;
331
+ }
332
+ export interface InputMessages {
333
+ version: typeof A365_MESSAGE_SCHEMA_VERSION;
334
+ messages: ChatMessage[];
335
+ }
336
+ /**
337
+ * An output message produced by a model (OTEL gen-ai semantic conventions).
338
+ */
339
+ export interface OutputMessage extends ChatMessage {
340
+ finish_reason?: FinishReason | string;
341
+ }
342
+ export interface OutputMessages {
343
+ version: typeof A365_MESSAGE_SCHEMA_VERSION;
344
+ messages: OutputMessage[];
345
+ }
346
+ export declare const A365_MESSAGE_SCHEMA_VERSION: "0.1.0";
347
+ /** Accepted input for `recordInputMessages`. Supports a single string, an array of strings (backward compat), or the versioned wrapper. */
348
+ export type InputMessagesParam = string | string[] | InputMessages;
349
+ /** Accepted input for `recordOutputMessages`. Supports a single string, an array of strings (backward compat), or the versioned wrapper. */
350
+ export type OutputMessagesParam = string | string[] | OutputMessages;
351
+ /**
352
+ * Accepted input for `OutputResponse.messages`.
353
+ * Supports plain strings, structured OutputMessages, or a raw dict (treated as a tool call result
354
+ * per OTEL spec and serialized directly via JSON.stringify).
355
+ */
356
+ export type ResponseMessagesParam = OutputMessagesParam | Record<string, unknown>;
190
357
  //# sourceMappingURL=contracts.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../../../src/tracing/contracts.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,oBAAY,aAAa;IACvB,oEAAoE;IACpE,YAAY,iBAAiB;IAE7B,kEAAkE;IAClE,WAAW,gBAAgB;IAE3B,8EAA8E;IAC9E,YAAY,iBAAiB;IAE7B,6CAA6C;IAC7C,OAAO,YAAY;CACpB;AAED;;GAEG;AACH,oBAAY,cAAc;IACxB,oCAAoC;IACpC,KAAK,UAAU;IAEf,wCAAwC;IACxC,KAAK,UAAU;IAEf,wEAAwE;IACxE,KAAK,UAAU;IAEf,kCAAkC;IAClC,OAAO,YAAY;CACpB;AAED;;GAEG;AACH,oBAAY,sBAAsB;IAC9B,IAAI,SAAS;IACb,eAAe,mBAAoB;IACnC,gBAAgB,oBAAqB;CACxC;AAGD;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,sFAAsF;IACtF,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ,wCAAwC;IACxC,IAAI,CAAC,EAAE,MAAM,CAAC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eAAO,MAAM,2BAA2B,EAAG,OAAgB,CAAC;AAE5D,2IAA2I;AAC3I,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,aAAa,CAAC;AAEnE,4IAA4I;AAC5I,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,cAAc,CAAC;AAErE;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,GAAG,mBAAmB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC"}
@@ -1,23 +1,8 @@
1
1
  "use strict";
2
- // ------------------------------------------------------------------------------
3
- // Copyright (c) Microsoft Corporation. All rights reserved.
4
- // ------------------------------------------------------------------------------
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
5
4
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.InferenceOperationType = exports.InvocationRole = exports.ExecutionType = void 0;
7
- /**
8
- * Represents different types of agent invocations
9
- */
10
- var ExecutionType;
11
- (function (ExecutionType) {
12
- /** Direct human-to-agent invocation (e.g., through UI, API call) */
13
- ExecutionType["HumanToAgent"] = "HumanToAgent";
14
- /** Agent-to-agent invocation (e.g., one agent calling another) */
15
- ExecutionType["Agent2Agent"] = "Agent2Agent";
16
- /** Event-driven agent invocation (e.g., scheduled, webhook, message queue) */
17
- ExecutionType["EventToAgent"] = "EventToAgent";
18
- /** Unknown or unspecified invocation type */
19
- ExecutionType["Unknown"] = "Unknown";
20
- })(ExecutionType || (exports.ExecutionType = ExecutionType = {}));
5
+ exports.A365_MESSAGE_SCHEMA_VERSION = exports.Modality = exports.FinishReason = exports.MessageRole = exports.InferenceOperationType = exports.InvocationRole = void 0;
21
6
  /**
22
7
  * Represents different roles that can invoke an agent
23
8
  */
@@ -41,4 +26,40 @@ var InferenceOperationType;
41
26
  InferenceOperationType["TEXT_COMPLETION"] = "TextCompletion";
42
27
  InferenceOperationType["GENERATE_CONTENT"] = "GenerateContent";
43
28
  })(InferenceOperationType || (exports.InferenceOperationType = InferenceOperationType = {}));
29
+ // ---------------------------------------------------------------------------
30
+ // OpenTelemetry Semantic Convention – Gen-AI Message Format
31
+ // https://opentelemetry.io/docs/specs/semconv/gen-ai/gen-ai-input-messages.json
32
+ // https://opentelemetry.io/docs/specs/semconv/gen-ai/gen-ai-output-messages.json
33
+ // ---------------------------------------------------------------------------
34
+ /**
35
+ * Role of a message participant per OTEL gen-ai semantic conventions.
36
+ */
37
+ var MessageRole;
38
+ (function (MessageRole) {
39
+ MessageRole["SYSTEM"] = "system";
40
+ MessageRole["USER"] = "user";
41
+ MessageRole["ASSISTANT"] = "assistant";
42
+ MessageRole["TOOL"] = "tool";
43
+ })(MessageRole || (exports.MessageRole = MessageRole = {}));
44
+ /**
45
+ * Reason a model stopped generating per OTEL gen-ai semantic conventions.
46
+ */
47
+ var FinishReason;
48
+ (function (FinishReason) {
49
+ FinishReason["STOP"] = "stop";
50
+ FinishReason["LENGTH"] = "length";
51
+ FinishReason["CONTENT_FILTER"] = "content_filter";
52
+ FinishReason["TOOL_CALL"] = "tool_call";
53
+ FinishReason["ERROR"] = "error";
54
+ })(FinishReason || (exports.FinishReason = FinishReason = {}));
55
+ /**
56
+ * Media modality for blob, file, and URI parts.
57
+ */
58
+ var Modality;
59
+ (function (Modality) {
60
+ Modality["IMAGE"] = "image";
61
+ Modality["VIDEO"] = "video";
62
+ Modality["AUDIO"] = "audio";
63
+ })(Modality || (exports.Modality = Modality = {}));
64
+ exports.A365_MESSAGE_SCHEMA_VERSION = '0.1.0';
44
65
  //# sourceMappingURL=contracts.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"contracts.js","sourceRoot":"","sources":["../../../src/tracing/contracts.ts"],"names":[],"mappings":";AAAA,iFAAiF;AACjF,4DAA4D;AAC5D,iFAAiF;;;AAEjF;;GAEG;AACH,IAAY,aAYX;AAZD,WAAY,aAAa;IACvB,oEAAoE;IACpE,8CAA6B,CAAA;IAE7B,kEAAkE;IAClE,4CAA2B,CAAA;IAE3B,8EAA8E;IAC9E,8CAA6B,CAAA;IAE7B,6CAA6C;IAC7C,oCAAmB,CAAA;AACrB,CAAC,EAZW,aAAa,6BAAb,aAAa,QAYxB;AAED;;GAEG;AACH,IAAY,cAYX;AAZD,WAAY,cAAc;IACxB,oCAAoC;IACpC,iCAAe,CAAA;IAEf,wCAAwC;IACxC,iCAAe,CAAA;IAEf,wEAAwE;IACxE,iCAAe,CAAA;IAEf,kCAAkC;IAClC,qCAAmB,CAAA;AACrB,CAAC,EAZW,cAAc,8BAAd,cAAc,QAYzB;AAED;;GAEG;AACH,IAAY,sBAIX;AAJD,WAAY,sBAAsB;IAC9B,uCAAa,CAAA;IACb,4DAAmC,CAAA;IACnC,8DAAqC,CAAA;AACzC,CAAC,EAJW,sBAAsB,sCAAtB,sBAAsB,QAIjC"}
1
+ {"version":3,"file":"contracts.js","sourceRoot":"","sources":["../../../src/tracing/contracts.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAMlC;;GAEG;AACH,IAAY,cAYX;AAZD,WAAY,cAAc;IACxB,oCAAoC;IACpC,iCAAe,CAAA;IAEf,wCAAwC;IACxC,iCAAe,CAAA;IAEf,wEAAwE;IACxE,iCAAe,CAAA;IAEf,kCAAkC;IAClC,qCAAmB,CAAA;AACrB,CAAC,EAZW,cAAc,8BAAd,cAAc,QAYzB;AAED;;GAEG;AACH,IAAY,sBAIX;AAJD,WAAY,sBAAsB;IAChC,uCAAa,CAAA;IACb,4DAAkC,CAAA;IAClC,8DAAoC,CAAA;AACtC,CAAC,EAJW,sBAAsB,sCAAtB,sBAAsB,QAIjC;AA4PD,8EAA8E;AAC9E,4DAA4D;AAC5D,gFAAgF;AAChF,iFAAiF;AACjF,8EAA8E;AAE9E;;GAEG;AACH,IAAY,WAKX;AALD,WAAY,WAAW;IACrB,gCAAiB,CAAA;IACjB,4BAAa,CAAA;IACb,sCAAuB,CAAA;IACvB,4BAAa,CAAA;AACf,CAAC,EALW,WAAW,2BAAX,WAAW,QAKtB;AAED;;GAEG;AACH,IAAY,YAMX;AAND,WAAY,YAAY;IACtB,6BAAa,CAAA;IACb,iCAAiB,CAAA;IACjB,iDAAiC,CAAA;IACjC,uCAAuB,CAAA;IACvB,+BAAe,CAAA;AACjB,CAAC,EANW,YAAY,4BAAZ,YAAY,QAMvB;AAED;;GAEG;AACH,IAAY,QAIX;AAJD,WAAY,QAAQ;IAClB,2BAAe,CAAA;IACf,2BAAe,CAAA;IACf,2BAAe,CAAA;AACjB,CAAC,EAJW,QAAQ,wBAAR,QAAQ,QAInB;AAqIY,QAAA,2BAA2B,GAAG,OAAgB,CAAC"}
@@ -1,22 +1,27 @@
1
1
  import { ExportResult } from '@opentelemetry/core';
2
2
  import { ReadableSpan, SpanExporter } from '@opentelemetry/sdk-trace-base';
3
+ import { IConfigurationProvider } from '@microsoft/agents-a365-runtime';
4
+ import type { ObservabilityConfiguration } from '../../configuration';
3
5
  import { Agent365ExporterOptions } from './Agent365ExporterOptions';
4
6
  /**
5
7
  * Observability span exporter for Agent365:
6
8
  * - Partitions spans by (tenantId, agentId)
7
9
  * - Builds OTLP-like JSON: resourceSpans -> scopeSpans -> spans
8
- * - POSTs per group to https://{endpoint}/maven/agent365/agents/{agentId}/traces?api-version=1
9
- * or, when useS2SEndpoint is true, https://{endpoint}/maven/agent365/service/agents/{agentId}/traces?api-version=1
10
+ * - POSTs per group to https://{endpoint}/observability/tenants/{tenantId}/otlp/agents/{agentId}/traces?api-version=1
11
+ * or, when useS2SEndpoint is true, https://{endpoint}/observabilityService/tenants/{tenantId}/otlp/agents/{agentId}/traces?api-version=1
10
12
  * - Adds Bearer token via token_resolver(agentId, tenantId)
11
13
  */
12
14
  export declare class Agent365Exporter implements SpanExporter {
13
15
  private closed;
14
16
  private readonly options;
17
+ private readonly configProvider?;
15
18
  /**
16
19
  * Initialize exporter with a fully constructed options instance.
17
- * If tokenResolver is missing, installs cache-backed resolver.
20
+ * @param options Exporter options controlling batching, timeouts, token acquisition and endpoint shape.
21
+ * @param configProvider Optional configuration provider. When supplied, the exporter uses it for
22
+ * configuration lookups (custom domain, domain override) instead of the default env-based provider.
18
23
  */
19
- constructor(options: Agent365ExporterOptions);
24
+ constructor(options: Agent365ExporterOptions, configProvider?: IConfigurationProvider<ObservabilityConfiguration>);
20
25
  /**
21
26
  * Export spans to Agent365 service
22
27
  */
@@ -1 +1 @@
1
- {"version":3,"file":"Agent365Exporter.d.ts","sourceRoot":"","sources":["../../../../src/tracing/exporter/Agent365Exporter.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAoB,MAAM,qBAAqB,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAiB3E,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAuDpE;;;;;;;GAOG;AACH,qBAAa,gBAAiB,YAAW,YAAY;IACnD,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA0B;IAElD;;;OAGG;gBACS,OAAO,EAAE,uBAAuB;IAW5C;;OAEG;IACG,MAAM,CAAC,KAAK,EAAE,YAAY,EAAE,EAAE,cAAc,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAwClG;;OAEG;YACW,WAAW;IA0EzB;;OAEG;YACW,eAAe;IA4C7B;;OAEG;IACH,OAAO,CAAC,KAAK;IAIb;;OAEG;IACH,OAAO,CAAC,kBAAkB;IA4C1B;;OAEG;IACH,OAAO,CAAC,OAAO;IAqFf;;OAEG;IACG,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAK/B;;OAEG;IACG,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;CAIlC"}
1
+ {"version":3,"file":"Agent365Exporter.d.ts","sourceRoot":"","sources":["../../../../src/tracing/exporter/Agent365Exporter.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAoB,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