@microsoft/opentelemetry 1.0.2 → 1.2.0
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/README.md +74 -71
- package/dist/commonjs/a365/configuration/A365Configuration.d.ts +3 -0
- package/dist/commonjs/a365/configuration/A365Configuration.d.ts.map +1 -1
- package/dist/commonjs/a365/configuration/A365Configuration.js +8 -3
- package/dist/commonjs/a365/configuration/A365Configuration.js.map +1 -1
- package/dist/commonjs/a365/configuration/A365ConfigurationOptions.d.ts +10 -1
- package/dist/commonjs/a365/configuration/A365ConfigurationOptions.d.ts.map +1 -1
- package/dist/commonjs/a365/constants.d.ts +134 -3
- package/dist/commonjs/a365/constants.d.ts.map +1 -1
- package/dist/commonjs/a365/constants.js +141 -2
- package/dist/commonjs/a365/constants.js.map +1 -1
- package/dist/commonjs/a365/contracts.d.ts +246 -8
- package/dist/commonjs/a365/contracts.d.ts.map +1 -1
- package/dist/commonjs/a365/contracts.js +81 -3
- package/dist/commonjs/a365/contracts.js.map +1 -1
- package/dist/commonjs/a365/exporter/Agent365Exporter.d.ts +33 -1
- package/dist/commonjs/a365/exporter/Agent365Exporter.d.ts.map +1 -1
- package/dist/commonjs/a365/exporter/Agent365Exporter.js +134 -3
- package/dist/commonjs/a365/exporter/Agent365Exporter.js.map +1 -1
- package/dist/commonjs/a365/exporter/Agent365ExporterOptions.d.ts +28 -1
- package/dist/commonjs/a365/exporter/Agent365ExporterOptions.d.ts.map +1 -1
- package/dist/commonjs/a365/exporter/Agent365ExporterOptions.js +2 -0
- package/dist/commonjs/a365/exporter/Agent365ExporterOptions.js.map +1 -1
- package/dist/commonjs/a365/exporter/AgentIdentity.d.ts +17 -0
- package/dist/commonjs/a365/exporter/AgentIdentity.d.ts.map +1 -0
- package/dist/commonjs/a365/exporter/AgentIdentity.js +5 -0
- package/dist/commonjs/a365/exporter/AgentIdentity.js.map +1 -0
- package/dist/commonjs/a365/exporter/ExporterEventNames.d.ts +3 -0
- package/dist/commonjs/a365/exporter/ExporterEventNames.d.ts.map +1 -1
- package/dist/commonjs/a365/exporter/ExporterEventNames.js +3 -0
- package/dist/commonjs/a365/exporter/ExporterEventNames.js.map +1 -1
- package/dist/commonjs/a365/exporter/TokenResolverContext.d.ts +18 -0
- package/dist/commonjs/a365/exporter/TokenResolverContext.d.ts.map +1 -0
- package/dist/commonjs/a365/exporter/TokenResolverContext.js +5 -0
- package/dist/commonjs/a365/exporter/TokenResolverContext.js.map +1 -0
- package/dist/commonjs/a365/exporter/index.d.ts +3 -1
- package/dist/commonjs/a365/exporter/index.d.ts.map +1 -1
- package/dist/commonjs/a365/exporter/index.js.map +1 -1
- package/dist/commonjs/a365/exporter/utils.d.ts +5 -0
- package/dist/commonjs/a365/exporter/utils.d.ts.map +1 -1
- package/dist/commonjs/a365/exporter/utils.js +23 -25
- package/dist/commonjs/a365/exporter/utils.js.map +1 -1
- package/dist/commonjs/a365/hosting/agenticTokenCache.d.ts +24 -0
- package/dist/commonjs/a365/hosting/agenticTokenCache.d.ts.map +1 -1
- package/dist/commonjs/a365/hosting/agenticTokenCache.js +40 -3
- package/dist/commonjs/a365/hosting/agenticTokenCache.js.map +1 -1
- package/dist/commonjs/a365/hosting/index.d.ts +1 -1
- package/dist/commonjs/a365/hosting/index.d.ts.map +1 -1
- package/dist/commonjs/a365/hosting/index.js +2 -1
- package/dist/commonjs/a365/hosting/index.js.map +1 -1
- package/dist/commonjs/a365/hosting/scopeUtils.js +1 -1
- package/dist/commonjs/a365/hosting/scopeUtils.js.map +1 -1
- package/dist/commonjs/a365/hosting/turnContextUtils.d.ts +6 -1
- package/dist/commonjs/a365/hosting/turnContextUtils.d.ts.map +1 -1
- package/dist/commonjs/a365/hosting/turnContextUtils.js +31 -5
- package/dist/commonjs/a365/hosting/turnContextUtils.js.map +1 -1
- package/dist/commonjs/a365/hosting/types.d.ts +48 -2
- package/dist/commonjs/a365/hosting/types.d.ts.map +1 -1
- package/dist/commonjs/a365/index.d.ts +5 -5
- package/dist/commonjs/a365/index.d.ts.map +1 -1
- package/dist/commonjs/a365/index.js +8 -2
- package/dist/commonjs/a365/index.js.map +1 -1
- package/dist/commonjs/a365/message-utils.d.ts +10 -5
- package/dist/commonjs/a365/message-utils.d.ts.map +1 -1
- package/dist/commonjs/a365/message-utils.js +27 -24
- package/dist/commonjs/a365/message-utils.js.map +1 -1
- package/dist/commonjs/a365/processors/A365SpanProcessor.d.ts +3 -0
- package/dist/commonjs/a365/processors/A365SpanProcessor.d.ts.map +1 -1
- package/dist/commonjs/a365/processors/A365SpanProcessor.js +12 -4
- package/dist/commonjs/a365/processors/A365SpanProcessor.js.map +1 -1
- package/dist/commonjs/a365/scopes/ApplyGuardrailScope.d.ts +45 -0
- package/dist/commonjs/a365/scopes/ApplyGuardrailScope.d.ts.map +1 -0
- package/dist/commonjs/a365/scopes/ApplyGuardrailScope.js +132 -0
- package/dist/commonjs/a365/scopes/ApplyGuardrailScope.js.map +1 -0
- package/dist/commonjs/a365/scopes/OpenTelemetryScope.d.ts +8 -2
- package/dist/commonjs/a365/scopes/OpenTelemetryScope.d.ts.map +1 -1
- package/dist/commonjs/a365/scopes/OpenTelemetryScope.js +9 -1
- package/dist/commonjs/a365/scopes/OpenTelemetryScope.js.map +1 -1
- package/dist/commonjs/a365/scopes/OutputScope.d.ts.map +1 -1
- package/dist/commonjs/a365/scopes/OutputScope.js +2 -4
- package/dist/commonjs/a365/scopes/OutputScope.js.map +1 -1
- package/dist/commonjs/a365/scopes/index.d.ts +1 -0
- package/dist/commonjs/a365/scopes/index.d.ts.map +1 -1
- package/dist/commonjs/a365/scopes/index.js +3 -1
- package/dist/commonjs/a365/scopes/index.js.map +1 -1
- package/dist/commonjs/azureMonitor/index.d.ts +6 -6
- package/dist/commonjs/azureMonitor/index.d.ts.map +1 -1
- package/dist/commonjs/azureMonitor/index.js +3 -3
- package/dist/commonjs/azureMonitor/index.js.map +1 -1
- package/dist/commonjs/azureMonitor/logs/handler.d.ts +3 -3
- package/dist/commonjs/azureMonitor/logs/handler.js +3 -3
- package/dist/commonjs/azureMonitor/metrics/handler.d.ts +1 -1
- package/dist/commonjs/azureMonitor/metrics/handler.js +1 -1
- package/dist/commonjs/azureMonitor/metrics/performanceCounters.d.ts +2 -2
- package/dist/commonjs/azureMonitor/metrics/performanceCounters.js +2 -2
- package/dist/commonjs/azureMonitor/metrics/quickpulse/filtering/validator.js +2 -2
- package/dist/commonjs/azureMonitor/metrics/quickpulse/filtering/validator.js.map +1 -1
- package/dist/commonjs/azureMonitor/metrics/quickpulse/liveMetrics.d.ts +4 -4
- package/dist/commonjs/azureMonitor/metrics/quickpulse/liveMetrics.d.ts.map +1 -1
- package/dist/commonjs/azureMonitor/metrics/quickpulse/liveMetrics.js +27 -15
- package/dist/commonjs/azureMonitor/metrics/quickpulse/liveMetrics.js.map +1 -1
- package/dist/commonjs/azureMonitor/metrics/quickpulse/utils.js +1 -1
- package/dist/commonjs/azureMonitor/metrics/quickpulse/utils.js.map +1 -1
- package/dist/commonjs/azureMonitor/metrics/standardMetrics.d.ts +1 -1
- package/dist/commonjs/azureMonitor/metrics/standardMetrics.js +1 -1
- package/dist/commonjs/distro/autoAttach.js +2 -2
- package/dist/commonjs/distro/autoAttach.js.map +1 -1
- package/dist/commonjs/distro/distro.d.ts +2 -2
- package/dist/commonjs/distro/distro.d.ts.map +1 -1
- package/dist/commonjs/distro/distro.js +70 -36
- package/dist/commonjs/distro/distro.js.map +1 -1
- package/dist/commonjs/distro/instrumentations.d.ts +2 -2
- package/dist/commonjs/distro/instrumentations.js +2 -2
- package/dist/commonjs/distro/loader.d.ts +1 -1
- package/dist/commonjs/distro/loader.js +1 -1
- package/dist/commonjs/genai/index.d.ts +1 -0
- package/dist/commonjs/genai/index.d.ts.map +1 -1
- package/dist/commonjs/genai/index.js +9 -0
- package/dist/commonjs/genai/index.js.map +1 -1
- package/dist/commonjs/genai/instrumentations/langchain/langchainTraceInstrumentor.d.ts +1 -1
- package/dist/commonjs/genai/instrumentations/langchain/langchainTraceInstrumentor.d.ts.map +1 -1
- package/dist/commonjs/genai/instrumentations/langchain/langchainTraceInstrumentor.js +11 -54
- package/dist/commonjs/genai/instrumentations/langchain/langchainTraceInstrumentor.js.map +1 -1
- package/dist/commonjs/genai/instrumentations/langchain/tracer.d.ts +3 -3
- package/dist/commonjs/genai/instrumentations/langchain/tracer.d.ts.map +1 -1
- package/dist/commonjs/genai/instrumentations/langchain/tracer.js +31 -9
- package/dist/commonjs/genai/instrumentations/langchain/tracer.js.map +1 -1
- package/dist/commonjs/genai/instrumentations/langchain/utils.d.ts +6 -0
- package/dist/commonjs/genai/instrumentations/langchain/utils.d.ts.map +1 -1
- package/dist/commonjs/genai/instrumentations/langchain/utils.js +159 -21
- package/dist/commonjs/genai/instrumentations/langchain/utils.js.map +1 -1
- package/dist/commonjs/genai/instrumentations/openai/utils.d.ts.map +1 -1
- package/dist/commonjs/genai/instrumentations/openai/utils.js +9 -4
- package/dist/commonjs/genai/instrumentations/openai/utils.js.map +1 -1
- package/dist/commonjs/genai/mainAgent/constants.d.ts +21 -0
- package/dist/commonjs/genai/mainAgent/constants.d.ts.map +1 -0
- package/dist/commonjs/genai/mainAgent/constants.js +26 -0
- package/dist/commonjs/genai/mainAgent/constants.js.map +1 -0
- package/dist/commonjs/genai/mainAgent/index.d.ts +3 -0
- package/dist/commonjs/genai/mainAgent/index.d.ts.map +1 -0
- package/dist/commonjs/genai/mainAgent/index.js +15 -0
- package/dist/commonjs/genai/mainAgent/index.js.map +1 -0
- package/dist/commonjs/genai/mainAgent/processor.d.ts +64 -0
- package/dist/commonjs/genai/mainAgent/processor.d.ts.map +1 -0
- package/dist/commonjs/genai/mainAgent/processor.js +150 -0
- package/dist/commonjs/genai/mainAgent/processor.js.map +1 -0
- package/dist/commonjs/genai/semconv.d.ts +3 -0
- package/dist/commonjs/genai/semconv.d.ts.map +1 -1
- package/dist/commonjs/genai/semconv.js +4 -1
- package/dist/commonjs/genai/semconv.js.map +1 -1
- package/dist/commonjs/index.d.ts +4 -3
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +16 -2
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/otlp/handler.d.ts.map +1 -1
- package/dist/commonjs/otlp/handler.js +3 -6
- package/dist/commonjs/otlp/handler.js.map +1 -1
- package/dist/commonjs/sdkstats/constants.d.ts +45 -0
- package/dist/commonjs/sdkstats/constants.d.ts.map +1 -0
- package/dist/commonjs/sdkstats/constants.js +77 -0
- package/dist/commonjs/sdkstats/constants.js.map +1 -0
- package/dist/commonjs/sdkstats/index.d.ts +6 -3
- package/dist/commonjs/sdkstats/index.d.ts.map +1 -1
- package/dist/commonjs/sdkstats/index.js +22 -4
- package/dist/commonjs/sdkstats/index.js.map +1 -1
- package/dist/commonjs/sdkstats/manager.d.ts +7 -3
- package/dist/commonjs/sdkstats/manager.d.ts.map +1 -1
- package/dist/commonjs/sdkstats/manager.js +100 -27
- package/dist/commonjs/sdkstats/manager.js.map +1 -1
- package/dist/commonjs/sdkstats/metrics.d.ts +46 -2
- package/dist/commonjs/sdkstats/metrics.d.ts.map +1 -1
- package/dist/commonjs/sdkstats/metrics.js +117 -14
- package/dist/commonjs/sdkstats/metrics.js.map +1 -1
- package/dist/commonjs/sdkstats/networkStats.d.ts +79 -0
- package/dist/commonjs/sdkstats/networkStats.d.ts.map +1 -0
- package/dist/commonjs/sdkstats/networkStats.js +191 -0
- package/dist/commonjs/sdkstats/networkStats.js.map +1 -0
- package/dist/commonjs/sdkstats/state.d.ts +10 -10
- package/dist/commonjs/sdkstats/state.d.ts.map +1 -1
- package/dist/commonjs/sdkstats/state.js +4 -4
- package/dist/commonjs/sdkstats/state.js.map +1 -1
- package/dist/commonjs/shared/config.d.ts +1 -1
- package/dist/commonjs/shared/config.js +1 -1
- package/dist/commonjs/types.d.ts +18 -18
- package/dist/commonjs/types.d.ts.map +1 -1
- package/dist/commonjs/types.js +89 -89
- package/dist/commonjs/types.js.map +1 -1
- package/dist/commonjs/utils/index.d.ts +1 -1
- package/dist/commonjs/utils/index.d.ts.map +1 -1
- package/dist/commonjs/utils/index.js +2 -2
- package/dist/commonjs/utils/index.js.map +1 -1
- package/dist/commonjs/utils/opentelemetryInstrumentationPatcher.d.ts +1 -1
- package/dist/commonjs/utils/opentelemetryInstrumentationPatcher.js +11 -11
- package/dist/commonjs/utils/opentelemetryInstrumentationPatcher.js.map +1 -1
- package/dist/commonjs/utils/sdkStats.d.ts +15 -0
- package/dist/commonjs/utils/sdkStats.d.ts.map +1 -0
- package/dist/commonjs/utils/sdkStats.js +138 -0
- package/dist/commonjs/utils/sdkStats.js.map +1 -0
- package/dist/esm/a365/configuration/A365Configuration.d.ts +3 -0
- package/dist/esm/a365/configuration/A365Configuration.d.ts.map +1 -1
- package/dist/esm/a365/configuration/A365Configuration.js +8 -3
- package/dist/esm/a365/configuration/A365Configuration.js.map +1 -1
- package/dist/esm/a365/configuration/A365ConfigurationOptions.d.ts +10 -1
- package/dist/esm/a365/configuration/A365ConfigurationOptions.d.ts.map +1 -1
- package/dist/esm/a365/constants.d.ts +134 -3
- package/dist/esm/a365/constants.d.ts.map +1 -1
- package/dist/esm/a365/constants.js +141 -2
- package/dist/esm/a365/constants.js.map +1 -1
- package/dist/esm/a365/contracts.d.ts +246 -8
- package/dist/esm/a365/contracts.d.ts.map +1 -1
- package/dist/esm/a365/contracts.js +80 -2
- package/dist/esm/a365/contracts.js.map +1 -1
- package/dist/esm/a365/exporter/Agent365Exporter.d.ts +33 -1
- package/dist/esm/a365/exporter/Agent365Exporter.d.ts.map +1 -1
- package/dist/esm/a365/exporter/Agent365Exporter.js +135 -4
- package/dist/esm/a365/exporter/Agent365Exporter.js.map +1 -1
- package/dist/esm/a365/exporter/Agent365ExporterOptions.d.ts +28 -1
- package/dist/esm/a365/exporter/Agent365ExporterOptions.d.ts.map +1 -1
- package/dist/esm/a365/exporter/Agent365ExporterOptions.js +2 -0
- package/dist/esm/a365/exporter/Agent365ExporterOptions.js.map +1 -1
- package/dist/esm/a365/exporter/AgentIdentity.d.ts +17 -0
- package/dist/esm/a365/exporter/AgentIdentity.d.ts.map +1 -0
- package/dist/esm/a365/exporter/AgentIdentity.js +4 -0
- package/dist/esm/a365/exporter/AgentIdentity.js.map +1 -0
- package/dist/esm/a365/exporter/ExporterEventNames.d.ts +3 -0
- package/dist/esm/a365/exporter/ExporterEventNames.d.ts.map +1 -1
- package/dist/esm/a365/exporter/ExporterEventNames.js +3 -0
- package/dist/esm/a365/exporter/ExporterEventNames.js.map +1 -1
- package/dist/esm/a365/exporter/TokenResolverContext.d.ts +18 -0
- package/dist/esm/a365/exporter/TokenResolverContext.d.ts.map +1 -0
- package/dist/esm/a365/exporter/TokenResolverContext.js +4 -0
- package/dist/esm/a365/exporter/TokenResolverContext.js.map +1 -0
- package/dist/esm/a365/exporter/index.d.ts +3 -1
- package/dist/esm/a365/exporter/index.d.ts.map +1 -1
- package/dist/esm/a365/exporter/index.js.map +1 -1
- package/dist/esm/a365/exporter/utils.d.ts +5 -0
- package/dist/esm/a365/exporter/utils.d.ts.map +1 -1
- package/dist/esm/a365/exporter/utils.js +22 -24
- package/dist/esm/a365/exporter/utils.js.map +1 -1
- package/dist/esm/a365/hosting/agenticTokenCache.d.ts +24 -0
- package/dist/esm/a365/hosting/agenticTokenCache.d.ts.map +1 -1
- package/dist/esm/a365/hosting/agenticTokenCache.js +40 -3
- package/dist/esm/a365/hosting/agenticTokenCache.js.map +1 -1
- package/dist/esm/a365/hosting/index.d.ts +1 -1
- package/dist/esm/a365/hosting/index.d.ts.map +1 -1
- package/dist/esm/a365/hosting/index.js +1 -1
- package/dist/esm/a365/hosting/index.js.map +1 -1
- package/dist/esm/a365/hosting/scopeUtils.js +2 -2
- package/dist/esm/a365/hosting/scopeUtils.js.map +1 -1
- package/dist/esm/a365/hosting/turnContextUtils.d.ts +6 -1
- package/dist/esm/a365/hosting/turnContextUtils.d.ts.map +1 -1
- package/dist/esm/a365/hosting/turnContextUtils.js +30 -5
- package/dist/esm/a365/hosting/turnContextUtils.js.map +1 -1
- package/dist/esm/a365/hosting/types.d.ts +48 -2
- package/dist/esm/a365/hosting/types.d.ts.map +1 -1
- package/dist/esm/a365/index.d.ts +5 -5
- package/dist/esm/a365/index.d.ts.map +1 -1
- package/dist/esm/a365/index.js +3 -3
- package/dist/esm/a365/index.js.map +1 -1
- package/dist/esm/a365/message-utils.d.ts +10 -5
- package/dist/esm/a365/message-utils.d.ts.map +1 -1
- package/dist/esm/a365/message-utils.js +28 -25
- package/dist/esm/a365/message-utils.js.map +1 -1
- package/dist/esm/a365/processors/A365SpanProcessor.d.ts +3 -0
- package/dist/esm/a365/processors/A365SpanProcessor.d.ts.map +1 -1
- package/dist/esm/a365/processors/A365SpanProcessor.js +12 -4
- package/dist/esm/a365/processors/A365SpanProcessor.js.map +1 -1
- package/dist/esm/a365/scopes/ApplyGuardrailScope.d.ts +45 -0
- package/dist/esm/a365/scopes/ApplyGuardrailScope.d.ts.map +1 -0
- package/dist/esm/a365/scopes/ApplyGuardrailScope.js +128 -0
- package/dist/esm/a365/scopes/ApplyGuardrailScope.js.map +1 -0
- package/dist/esm/a365/scopes/OpenTelemetryScope.d.ts +8 -2
- package/dist/esm/a365/scopes/OpenTelemetryScope.d.ts.map +1 -1
- package/dist/esm/a365/scopes/OpenTelemetryScope.js +9 -1
- package/dist/esm/a365/scopes/OpenTelemetryScope.js.map +1 -1
- package/dist/esm/a365/scopes/OutputScope.d.ts.map +1 -1
- package/dist/esm/a365/scopes/OutputScope.js +2 -4
- package/dist/esm/a365/scopes/OutputScope.js.map +1 -1
- package/dist/esm/a365/scopes/index.d.ts +1 -0
- package/dist/esm/a365/scopes/index.d.ts.map +1 -1
- package/dist/esm/a365/scopes/index.js +1 -0
- package/dist/esm/a365/scopes/index.js.map +1 -1
- package/dist/esm/azureMonitor/index.d.ts +6 -6
- package/dist/esm/azureMonitor/index.d.ts.map +1 -1
- package/dist/esm/azureMonitor/index.js +2 -2
- package/dist/esm/azureMonitor/index.js.map +1 -1
- package/dist/esm/azureMonitor/logs/handler.d.ts +3 -3
- package/dist/esm/azureMonitor/logs/handler.js +3 -3
- package/dist/esm/azureMonitor/metrics/handler.d.ts +1 -1
- package/dist/esm/azureMonitor/metrics/handler.js +1 -1
- package/dist/esm/azureMonitor/metrics/performanceCounters.d.ts +2 -2
- package/dist/esm/azureMonitor/metrics/performanceCounters.js +2 -2
- package/dist/esm/azureMonitor/metrics/quickpulse/filtering/validator.js +2 -2
- package/dist/esm/azureMonitor/metrics/quickpulse/filtering/validator.js.map +1 -1
- package/dist/esm/azureMonitor/metrics/quickpulse/liveMetrics.d.ts +4 -4
- package/dist/esm/azureMonitor/metrics/quickpulse/liveMetrics.d.ts.map +1 -1
- package/dist/esm/azureMonitor/metrics/quickpulse/liveMetrics.js +27 -15
- package/dist/esm/azureMonitor/metrics/quickpulse/liveMetrics.js.map +1 -1
- package/dist/esm/azureMonitor/metrics/quickpulse/utils.js +1 -1
- package/dist/esm/azureMonitor/metrics/quickpulse/utils.js.map +1 -1
- package/dist/esm/azureMonitor/metrics/standardMetrics.d.ts +1 -1
- package/dist/esm/azureMonitor/metrics/standardMetrics.js +1 -1
- package/dist/esm/distro/autoAttach.js +2 -2
- package/dist/esm/distro/autoAttach.js.map +1 -1
- package/dist/esm/distro/distro.d.ts +2 -2
- package/dist/esm/distro/distro.d.ts.map +1 -1
- package/dist/esm/distro/distro.js +62 -28
- package/dist/esm/distro/distro.js.map +1 -1
- package/dist/esm/distro/instrumentations.d.ts +2 -2
- package/dist/esm/distro/instrumentations.js +2 -2
- package/dist/esm/distro/loader.d.ts +1 -1
- package/dist/esm/distro/loader.js +1 -1
- package/dist/esm/genai/index.d.ts +1 -0
- package/dist/esm/genai/index.d.ts.map +1 -1
- package/dist/esm/genai/index.js +1 -0
- package/dist/esm/genai/index.js.map +1 -1
- package/dist/esm/genai/instrumentations/langchain/langchainTraceInstrumentor.d.ts +1 -1
- package/dist/esm/genai/instrumentations/langchain/langchainTraceInstrumentor.d.ts.map +1 -1
- package/dist/esm/genai/instrumentations/langchain/langchainTraceInstrumentor.js +11 -21
- package/dist/esm/genai/instrumentations/langchain/langchainTraceInstrumentor.js.map +1 -1
- package/dist/esm/genai/instrumentations/langchain/tracer.d.ts +3 -3
- package/dist/esm/genai/instrumentations/langchain/tracer.d.ts.map +1 -1
- package/dist/esm/genai/instrumentations/langchain/tracer.js +31 -9
- package/dist/esm/genai/instrumentations/langchain/tracer.js.map +1 -1
- package/dist/esm/genai/instrumentations/langchain/utils.d.ts +6 -0
- package/dist/esm/genai/instrumentations/langchain/utils.d.ts.map +1 -1
- package/dist/esm/genai/instrumentations/langchain/utils.js +155 -23
- package/dist/esm/genai/instrumentations/langchain/utils.js.map +1 -1
- package/dist/esm/genai/instrumentations/openai/utils.d.ts.map +1 -1
- package/dist/esm/genai/instrumentations/openai/utils.js +10 -5
- package/dist/esm/genai/instrumentations/openai/utils.js.map +1 -1
- package/dist/esm/genai/mainAgent/constants.d.ts +21 -0
- package/dist/esm/genai/mainAgent/constants.d.ts.map +1 -0
- package/dist/esm/genai/mainAgent/constants.js +23 -0
- package/dist/esm/genai/mainAgent/constants.js.map +1 -0
- package/dist/esm/genai/mainAgent/index.d.ts +3 -0
- package/dist/esm/genai/mainAgent/index.d.ts.map +1 -0
- package/dist/esm/genai/mainAgent/index.js +5 -0
- package/dist/esm/genai/mainAgent/index.js.map +1 -0
- package/dist/esm/genai/mainAgent/processor.d.ts +64 -0
- package/dist/esm/genai/mainAgent/processor.d.ts.map +1 -0
- package/dist/esm/genai/mainAgent/processor.js +145 -0
- package/dist/esm/genai/mainAgent/processor.js.map +1 -0
- package/dist/esm/genai/semconv.d.ts +3 -0
- package/dist/esm/genai/semconv.d.ts.map +1 -1
- package/dist/esm/genai/semconv.js +3 -0
- package/dist/esm/genai/semconv.js.map +1 -1
- package/dist/esm/index.d.ts +4 -3
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +3 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/otlp/handler.d.ts.map +1 -1
- package/dist/esm/otlp/handler.js +3 -6
- package/dist/esm/otlp/handler.js.map +1 -1
- package/dist/esm/sdkstats/constants.d.ts +45 -0
- package/dist/esm/sdkstats/constants.d.ts.map +1 -0
- package/dist/esm/sdkstats/constants.js +74 -0
- package/dist/esm/sdkstats/constants.js.map +1 -0
- package/dist/esm/sdkstats/index.d.ts +6 -3
- package/dist/esm/sdkstats/index.d.ts.map +1 -1
- package/dist/esm/sdkstats/index.js +4 -3
- package/dist/esm/sdkstats/index.js.map +1 -1
- package/dist/esm/sdkstats/manager.d.ts +7 -3
- package/dist/esm/sdkstats/manager.d.ts.map +1 -1
- package/dist/esm/sdkstats/manager.js +100 -27
- package/dist/esm/sdkstats/manager.js.map +1 -1
- package/dist/esm/sdkstats/metrics.d.ts +46 -2
- package/dist/esm/sdkstats/metrics.d.ts.map +1 -1
- package/dist/esm/sdkstats/metrics.js +117 -14
- package/dist/esm/sdkstats/metrics.js.map +1 -1
- package/dist/esm/sdkstats/networkStats.d.ts +79 -0
- package/dist/esm/sdkstats/networkStats.d.ts.map +1 -0
- package/dist/esm/sdkstats/networkStats.js +172 -0
- package/dist/esm/sdkstats/networkStats.js.map +1 -0
- package/dist/esm/sdkstats/state.d.ts +10 -10
- package/dist/esm/sdkstats/state.d.ts.map +1 -1
- package/dist/esm/sdkstats/state.js +4 -4
- package/dist/esm/sdkstats/state.js.map +1 -1
- package/dist/esm/shared/config.d.ts +1 -1
- package/dist/esm/shared/config.js +1 -1
- package/dist/esm/types.d.ts +18 -18
- package/dist/esm/types.d.ts.map +1 -1
- package/dist/esm/types.js +88 -88
- package/dist/esm/types.js.map +1 -1
- package/dist/esm/utils/index.d.ts +1 -1
- package/dist/esm/utils/index.d.ts.map +1 -1
- package/dist/esm/utils/index.js +1 -1
- package/dist/esm/utils/index.js.map +1 -1
- package/dist/esm/utils/opentelemetryInstrumentationPatcher.d.ts +1 -1
- package/dist/esm/utils/opentelemetryInstrumentationPatcher.js +12 -12
- package/dist/esm/utils/opentelemetryInstrumentationPatcher.js.map +1 -1
- package/dist/esm/utils/sdkStats.d.ts +15 -0
- package/dist/esm/utils/sdkStats.d.ts.map +1 -0
- package/dist/esm/utils/sdkStats.js +135 -0
- package/dist/esm/utils/sdkStats.js.map +1 -0
- package/package.json +38 -29
- package/dist/commonjs/utils/statsbeat.d.ts +0 -15
- package/dist/commonjs/utils/statsbeat.d.ts.map +0 -1
- package/dist/commonjs/utils/statsbeat.js +0 -127
- package/dist/commonjs/utils/statsbeat.js.map +0 -1
- package/dist/esm/utils/statsbeat.d.ts +0 -15
- package/dist/esm/utils/statsbeat.d.ts.map +0 -1
- package/dist/esm/utils/statsbeat.js +0 -124
- package/dist/esm/utils/statsbeat.js.map +0 -1
|
@@ -5,176 +5,264 @@
|
|
|
5
5
|
* following OTel gen-ai semantic conventions.
|
|
6
6
|
*/
|
|
7
7
|
import type { SpanKind, TimeInput, Link, Context, TraceState } from "@opentelemetry/api";
|
|
8
|
-
|
|
8
|
+
/** Default finish reason applied when none is provided (per OTel spec). */
|
|
9
|
+
export declare const DEFAULT_FINISH_REASON: "stop";
|
|
9
10
|
/** Role of a message participant per OTEL gen-ai semantic conventions. */
|
|
10
11
|
export declare enum MessageRole {
|
|
12
|
+
/** A system / developer instruction message. */
|
|
11
13
|
SYSTEM = "system",
|
|
14
|
+
/** A message authored by the end user. */
|
|
12
15
|
USER = "user",
|
|
16
|
+
/** A message authored by the model/assistant. */
|
|
13
17
|
ASSISTANT = "assistant",
|
|
18
|
+
/** A message containing the result of a tool call. */
|
|
14
19
|
TOOL = "tool"
|
|
15
20
|
}
|
|
16
21
|
/** Reason a model stopped generating per OTEL gen-ai semantic conventions. */
|
|
17
22
|
export declare enum FinishReason {
|
|
23
|
+
/** The model reached a natural stopping point or a provided stop sequence. */
|
|
18
24
|
STOP = "stop",
|
|
25
|
+
/** Generation stopped because the maximum token limit was reached. */
|
|
19
26
|
LENGTH = "length",
|
|
27
|
+
/** Generation was stopped by a content filter. */
|
|
20
28
|
CONTENT_FILTER = "content_filter",
|
|
29
|
+
/** The model emitted a tool call and is awaiting its result. */
|
|
21
30
|
TOOL_CALL = "tool_call",
|
|
31
|
+
/** Generation stopped because of an error. */
|
|
22
32
|
ERROR = "error"
|
|
23
33
|
}
|
|
24
34
|
/** Media modality for blob, file, and URI parts. */
|
|
25
35
|
export declare enum Modality {
|
|
36
|
+
/** Image content. */
|
|
26
37
|
IMAGE = "image",
|
|
38
|
+
/** Video content. */
|
|
27
39
|
VIDEO = "video",
|
|
40
|
+
/** Audio content. */
|
|
28
41
|
AUDIO = "audio"
|
|
29
42
|
}
|
|
30
43
|
/** Represents different roles that can invoke an agent. */
|
|
31
44
|
export declare enum InvocationRole {
|
|
45
|
+
/** The agent was invoked by a human user. */
|
|
32
46
|
Human = "Human",
|
|
47
|
+
/** The agent was invoked by another agent. */
|
|
33
48
|
Agent = "Agent",
|
|
49
|
+
/** The agent was invoked by a system event or trigger. */
|
|
34
50
|
Event = "Event",
|
|
51
|
+
/** The invoking role could not be determined. */
|
|
35
52
|
Unknown = "Unknown"
|
|
36
53
|
}
|
|
37
54
|
/** Represents different operation types for model inference. */
|
|
38
55
|
export declare enum InferenceOperationType {
|
|
56
|
+
/** A chat-completion request. */
|
|
39
57
|
CHAT = "Chat",
|
|
58
|
+
/** A text-completion request. */
|
|
40
59
|
TEXT_COMPLETION = "TextCompletion",
|
|
60
|
+
/** A multimodal content-generation request. */
|
|
41
61
|
GENERATE_CONTENT = "GenerateContent"
|
|
42
62
|
}
|
|
43
63
|
/** Plain text content. */
|
|
44
64
|
export interface TextPart {
|
|
65
|
+
/** Discriminator identifying this as a text part. */
|
|
45
66
|
type: "text";
|
|
67
|
+
/** The text content. */
|
|
46
68
|
content: string;
|
|
47
69
|
}
|
|
48
70
|
/** A tool call requested by the model. */
|
|
49
71
|
export interface ToolCallRequestPart {
|
|
72
|
+
/** Discriminator identifying this as a tool-call request part. */
|
|
50
73
|
type: "tool_call";
|
|
74
|
+
/** The name of the tool being called. */
|
|
51
75
|
name: string;
|
|
76
|
+
/** Unique identifier correlating this call with its response. */
|
|
52
77
|
id?: string;
|
|
78
|
+
/** Arguments passed to the tool, as an object or positional array. */
|
|
53
79
|
arguments?: Record<string, unknown> | unknown[];
|
|
54
80
|
}
|
|
55
81
|
/** Result of a tool call. */
|
|
56
82
|
export interface ToolCallResponsePart {
|
|
83
|
+
/** Discriminator identifying this as a tool-call response part. */
|
|
57
84
|
type: "tool_call_response";
|
|
85
|
+
/** Identifier of the originating tool call. */
|
|
58
86
|
id?: string;
|
|
87
|
+
/** The value returned by the tool. */
|
|
59
88
|
response?: unknown;
|
|
60
89
|
}
|
|
61
90
|
/** Model reasoning / chain-of-thought content. */
|
|
62
91
|
export interface ReasoningPart {
|
|
92
|
+
/** Discriminator identifying this as a reasoning part. */
|
|
63
93
|
type: "reasoning";
|
|
94
|
+
/** The reasoning / chain-of-thought text. */
|
|
64
95
|
content: string;
|
|
65
96
|
}
|
|
66
97
|
/** Inline binary data (base64-encoded). */
|
|
67
98
|
export interface BlobPart {
|
|
99
|
+
/** Discriminator identifying this as an inline blob part. */
|
|
68
100
|
type: "blob";
|
|
101
|
+
/** Media modality of the content (e.g. image, audio, video). */
|
|
69
102
|
modality: Modality | string;
|
|
103
|
+
/** MIME type of the content (e.g. `image/png`). */
|
|
70
104
|
mime_type?: string;
|
|
105
|
+
/** Base64-encoded binary content. */
|
|
71
106
|
content: string;
|
|
72
107
|
}
|
|
73
108
|
/** Reference to a pre-uploaded file. */
|
|
74
109
|
export interface FilePart {
|
|
110
|
+
/** Discriminator identifying this as a file-reference part. */
|
|
75
111
|
type: "file";
|
|
112
|
+
/** Media modality of the referenced file. */
|
|
76
113
|
modality: Modality | string;
|
|
114
|
+
/** MIME type of the referenced file. */
|
|
77
115
|
mime_type?: string;
|
|
116
|
+
/** Identifier of the pre-uploaded file. */
|
|
78
117
|
file_id: string;
|
|
79
118
|
}
|
|
80
119
|
/** External URI reference. */
|
|
81
120
|
export interface UriPart {
|
|
121
|
+
/** Discriminator identifying this as a URI-reference part. */
|
|
82
122
|
type: "uri";
|
|
123
|
+
/** Media modality of the referenced content. */
|
|
83
124
|
modality: Modality | string;
|
|
125
|
+
/** MIME type of the referenced content. */
|
|
84
126
|
mime_type?: string;
|
|
127
|
+
/** The external URI of the content. */
|
|
85
128
|
uri: string;
|
|
86
129
|
}
|
|
87
130
|
/** Extensible server tool call details. */
|
|
88
131
|
export interface GenericServerToolCall {
|
|
132
|
+
/** The server tool-call type discriminator. */
|
|
89
133
|
type: string;
|
|
134
|
+
/** Additional, provider-specific server tool-call fields. */
|
|
90
135
|
[key: string]: unknown;
|
|
91
136
|
}
|
|
92
137
|
/** Extensible server tool call response. */
|
|
93
138
|
export interface GenericServerToolCallResponse {
|
|
139
|
+
/** The server tool-call response type discriminator. */
|
|
94
140
|
type: string;
|
|
141
|
+
/** Additional, provider-specific server tool-call response fields. */
|
|
95
142
|
[key: string]: unknown;
|
|
96
143
|
}
|
|
97
144
|
/** Server-side tool invocation. */
|
|
98
145
|
export interface ServerToolCallPart {
|
|
146
|
+
/** Discriminator identifying this as a server tool-call part. */
|
|
99
147
|
type: "server_tool_call";
|
|
148
|
+
/** The name of the server-side tool being called. */
|
|
100
149
|
name: string;
|
|
150
|
+
/** Unique identifier correlating this call with its response. */
|
|
101
151
|
id?: string;
|
|
152
|
+
/** The server tool-call details. */
|
|
102
153
|
server_tool_call: GenericServerToolCall;
|
|
103
154
|
}
|
|
104
155
|
/** Server-side tool response. */
|
|
105
156
|
export interface ServerToolCallResponsePart {
|
|
157
|
+
/** Discriminator identifying this as a server tool-call response part. */
|
|
106
158
|
type: "server_tool_call_response";
|
|
159
|
+
/** Identifier of the originating server tool call. */
|
|
107
160
|
id?: string;
|
|
161
|
+
/** The server tool-call response details. */
|
|
108
162
|
server_tool_call_response: GenericServerToolCallResponse;
|
|
109
163
|
}
|
|
110
164
|
/** Extensible part for custom / future types. */
|
|
111
165
|
export interface GenericPart {
|
|
166
|
+
/** The part type discriminator. */
|
|
112
167
|
type: string;
|
|
168
|
+
/** Additional, custom part fields. */
|
|
113
169
|
[key: string]: unknown;
|
|
114
170
|
}
|
|
115
171
|
/** Union of all message part types per OTEL gen-ai semantic conventions. */
|
|
116
172
|
export type MessagePart = TextPart | ToolCallRequestPart | ToolCallResponsePart | ReasoningPart | BlobPart | FilePart | UriPart | ServerToolCallPart | ServerToolCallResponsePart | GenericPart;
|
|
117
173
|
/** An input message sent to a model (OTEL gen-ai semantic conventions). */
|
|
118
174
|
export interface ChatMessage {
|
|
175
|
+
/** Role of the message author (e.g. `user`, `assistant`). */
|
|
119
176
|
role: MessageRole | string;
|
|
177
|
+
/** Ordered list of content parts that make up the message. */
|
|
120
178
|
parts: MessagePart[];
|
|
179
|
+
/** Optional display name of the message author. */
|
|
121
180
|
name?: string;
|
|
122
181
|
}
|
|
123
|
-
/**
|
|
182
|
+
/** A structured wrapper around the list of input messages. */
|
|
124
183
|
export interface InputMessages {
|
|
125
|
-
|
|
184
|
+
/** The input messages, in order. */
|
|
126
185
|
messages: ChatMessage[];
|
|
127
186
|
}
|
|
128
|
-
/**
|
|
187
|
+
/**
|
|
188
|
+
* An output message produced by a model (OTEL gen-ai semantic conventions).
|
|
189
|
+
* `finish_reason` defaults to `"stop"` per OTel spec when not provided.
|
|
190
|
+
*/
|
|
129
191
|
export interface OutputMessage extends ChatMessage {
|
|
192
|
+
/** Reason the model stopped generating this message. Defaults to `"stop"`. */
|
|
130
193
|
finish_reason?: FinishReason | string;
|
|
131
194
|
}
|
|
132
|
-
/**
|
|
195
|
+
/** A structured wrapper around the list of output messages. */
|
|
133
196
|
export interface OutputMessages {
|
|
134
|
-
|
|
197
|
+
/** The output messages, in order. */
|
|
135
198
|
messages: OutputMessage[];
|
|
136
199
|
}
|
|
137
|
-
/** Accepted input for `recordInputMessages`. */
|
|
200
|
+
/** Accepted input for `recordInputMessages`. Supports a single string, an array of strings (backward compat), or the structured wrapper. */
|
|
138
201
|
export type InputMessagesParam = string | string[] | InputMessages;
|
|
139
|
-
/** Accepted input for `recordOutputMessages`. */
|
|
202
|
+
/** Accepted input for `recordOutputMessages`. Supports a single string, an array of strings (backward compat), or the structured wrapper. */
|
|
140
203
|
export type OutputMessagesParam = string | string[] | OutputMessages;
|
|
141
204
|
/** Accepted input for `OutputResponse.messages`. */
|
|
142
205
|
export type ResponseMessagesParam = OutputMessagesParam | Record<string, unknown>;
|
|
143
206
|
/** Represents a channel for an invocation. */
|
|
144
207
|
export interface Channel {
|
|
208
|
+
/** Unique identifier of the channel. */
|
|
145
209
|
id?: string;
|
|
210
|
+
/** Display name of the channel (e.g. `Microsoft Teams`). */
|
|
146
211
|
name?: string;
|
|
212
|
+
/** URI of the channel's icon. */
|
|
147
213
|
iconUri?: string;
|
|
214
|
+
/** Role that the channel plays in the invocation. */
|
|
148
215
|
role?: InvocationRole;
|
|
216
|
+
/** Human-readable description or deep link for the channel. */
|
|
149
217
|
description?: string;
|
|
150
218
|
}
|
|
151
219
|
/** Represents a request with telemetry context. */
|
|
152
220
|
export interface Request {
|
|
221
|
+
/** The input content (prompt / messages) for the request. */
|
|
153
222
|
content?: InputMessagesParam;
|
|
223
|
+
/** Identifier of the session this request belongs to. */
|
|
154
224
|
sessionId?: string;
|
|
225
|
+
/** The channel the request originated from. */
|
|
155
226
|
channel?: Channel;
|
|
227
|
+
/** Identifier of the conversation this request belongs to. */
|
|
156
228
|
conversationId?: string;
|
|
157
229
|
}
|
|
158
230
|
/** Details about an AI agent. */
|
|
159
231
|
export interface AgentDetails {
|
|
232
|
+
/** Unique identifier of the agent (required). */
|
|
160
233
|
agentId: string;
|
|
234
|
+
/** Display name of the agent. */
|
|
161
235
|
agentName?: string;
|
|
236
|
+
/** Human-readable description of the agent. */
|
|
162
237
|
agentDescription?: string;
|
|
238
|
+
/** URI of the agent's icon. */
|
|
163
239
|
iconUri?: string;
|
|
240
|
+
/** Identifier of the platform hosting the agent. */
|
|
164
241
|
platformId?: string;
|
|
242
|
+
/** Agentic user identifier (AAD Object ID) associated with the agent. */
|
|
165
243
|
agentAUID?: string;
|
|
244
|
+
/** Email address associated with the agentic user. */
|
|
166
245
|
agentEmail?: string;
|
|
246
|
+
/** Identifier of the blueprint the agent was created from. */
|
|
167
247
|
agentBlueprintId?: string;
|
|
248
|
+
/** Identifier of the tenant that owns the agent. */
|
|
168
249
|
tenantId?: string;
|
|
250
|
+
/** Name of the provider that hosts the agent. */
|
|
169
251
|
providerName?: string;
|
|
252
|
+
/** Version of the agent. */
|
|
170
253
|
agentVersion?: string;
|
|
171
254
|
}
|
|
172
255
|
/** Details about the human user caller. */
|
|
173
256
|
export interface UserDetails {
|
|
257
|
+
/** Unique identifier of the user. */
|
|
174
258
|
userId?: string;
|
|
259
|
+
/** Email address of the user. */
|
|
175
260
|
userEmail?: string;
|
|
261
|
+
/** Display name of the user. */
|
|
176
262
|
userName?: string;
|
|
263
|
+
/** Identifier of the tenant the user belongs to. */
|
|
177
264
|
tenantId?: string;
|
|
265
|
+
/** Client IP address of the caller. */
|
|
178
266
|
callerClientIp?: string;
|
|
179
267
|
}
|
|
180
268
|
/**
|
|
@@ -182,69 +270,219 @@ export interface UserDetails {
|
|
|
182
270
|
* Supports human callers, agent callers, or both (A2A with a human in the chain).
|
|
183
271
|
*/
|
|
184
272
|
export interface CallerDetails {
|
|
273
|
+
/** Identity details of the human user caller. */
|
|
185
274
|
userDetails?: UserDetails;
|
|
275
|
+
/** Identity details of the calling agent (for agent-to-agent scenarios). */
|
|
186
276
|
callerAgentDetails?: AgentDetails;
|
|
187
277
|
}
|
|
188
278
|
/** Represents an endpoint for agent invocation. */
|
|
189
279
|
export interface ServiceEndpoint {
|
|
280
|
+
/** Host name or IP address of the endpoint. */
|
|
190
281
|
host: string;
|
|
282
|
+
/** Port number of the endpoint. */
|
|
191
283
|
port?: number;
|
|
284
|
+
/** Protocol scheme of the endpoint (e.g. `https`). */
|
|
192
285
|
protocol?: string;
|
|
193
286
|
}
|
|
194
287
|
/** Details for invoking agent scope. */
|
|
195
288
|
export interface InvokeAgentScopeDetails {
|
|
289
|
+
/** Endpoint the agent is being invoked on. */
|
|
196
290
|
endpoint?: ServiceEndpoint;
|
|
197
291
|
}
|
|
198
292
|
/** Details of a tool call made by an agent. */
|
|
199
293
|
export interface ToolCallDetails {
|
|
294
|
+
/** Name of the tool being called (required). */
|
|
200
295
|
toolName: string;
|
|
296
|
+
/** Arguments passed to the tool, as an object or serialized string. */
|
|
201
297
|
arguments?: Record<string, unknown> | string;
|
|
298
|
+
/** Unique identifier of the tool call. */
|
|
202
299
|
toolCallId?: string;
|
|
300
|
+
/** Human-readable description of the tool. */
|
|
203
301
|
description?: string;
|
|
302
|
+
/** Category/type of the tool (e.g. `function`). */
|
|
204
303
|
toolType?: string;
|
|
304
|
+
/** Endpoint the tool is hosted on. */
|
|
205
305
|
endpoint?: ServiceEndpoint;
|
|
206
306
|
}
|
|
207
307
|
/** Details for an inference call. */
|
|
208
308
|
export interface InferenceDetails {
|
|
309
|
+
/** The inference operation type (e.g. chat, text completion). */
|
|
209
310
|
operationName: InferenceOperationType;
|
|
311
|
+
/** Name of the model used for inference. */
|
|
210
312
|
model: string;
|
|
313
|
+
/** Name of the provider serving the model. */
|
|
211
314
|
providerName?: string;
|
|
315
|
+
/** Number of input (prompt) tokens. */
|
|
212
316
|
inputTokens?: number;
|
|
317
|
+
/** Number of output (completion) tokens. */
|
|
213
318
|
outputTokens?: number;
|
|
319
|
+
/** Finish reasons returned by the model. */
|
|
214
320
|
finishReasons?: string[];
|
|
321
|
+
/** The model's thought process / reasoning trace. */
|
|
215
322
|
thoughtProcess?: string;
|
|
323
|
+
/** Endpoint the model is hosted on. */
|
|
216
324
|
endpoint?: ServiceEndpoint;
|
|
217
325
|
}
|
|
218
326
|
/** Details for recording the response from an inference call. */
|
|
219
327
|
export interface InferenceResponse {
|
|
328
|
+
/** The response content produced by the model. */
|
|
220
329
|
content: string;
|
|
330
|
+
/** Unique identifier of the response. */
|
|
221
331
|
responseId?: string;
|
|
332
|
+
/** Reason the model stopped generating. */
|
|
222
333
|
finishReason?: string;
|
|
334
|
+
/** Number of input (prompt) tokens. */
|
|
223
335
|
inputTokens?: number;
|
|
336
|
+
/** Number of output (completion) tokens. */
|
|
224
337
|
outputTokens?: number;
|
|
225
338
|
}
|
|
226
339
|
/** Represents a response containing output messages from an agent. */
|
|
227
340
|
export interface OutputResponse {
|
|
341
|
+
/** The output messages produced by the agent. */
|
|
228
342
|
messages: ResponseMessagesParam;
|
|
229
343
|
}
|
|
230
344
|
/** Parent context — either an OTel Context or a manual ParentSpanRef. */
|
|
231
345
|
export type ParentContext = Context | ParentSpanRef;
|
|
232
346
|
/** Manual parent span reference for cross-async-boundary tracing. */
|
|
233
347
|
export interface ParentSpanRef {
|
|
348
|
+
/** Trace identifier of the parent span. */
|
|
234
349
|
traceId: string;
|
|
350
|
+
/** Span identifier of the parent span. */
|
|
235
351
|
spanId: string;
|
|
352
|
+
/** Trace flags (e.g. sampled bit) of the parent span. */
|
|
236
353
|
traceFlags?: number;
|
|
354
|
+
/** W3C trace state carried from the parent span. */
|
|
237
355
|
traceState?: TraceState;
|
|
356
|
+
/** Whether the parent span originated on a remote system. */
|
|
238
357
|
isRemote?: boolean;
|
|
239
358
|
}
|
|
240
359
|
/**
|
|
241
360
|
* Span configuration details for scope creation.
|
|
242
361
|
*/
|
|
243
362
|
export interface SpanDetails {
|
|
363
|
+
/** Parent context the span should be created under. */
|
|
244
364
|
parentContext?: ParentContext;
|
|
365
|
+
/** Explicit start time for the span. */
|
|
245
366
|
startTime?: TimeInput;
|
|
367
|
+
/** Explicit end time for the span. */
|
|
246
368
|
endTime?: TimeInput;
|
|
369
|
+
/** Kind of span to create (e.g. client, server). */
|
|
247
370
|
spanKind?: SpanKind;
|
|
371
|
+
/** Links to other spans related to this span. */
|
|
248
372
|
spanLinks?: Link[];
|
|
249
373
|
}
|
|
374
|
+
/**
|
|
375
|
+
* The decision made by a security guardian during guardrail evaluation.
|
|
376
|
+
*/
|
|
377
|
+
export declare enum GuardrailDecisionType {
|
|
378
|
+
/** Content or action is allowed to proceed. */
|
|
379
|
+
Allow = "allow",
|
|
380
|
+
/** Content or action is logged for review but allowed to proceed. */
|
|
381
|
+
Audit = "audit",
|
|
382
|
+
/** Content or action is denied/blocked. */
|
|
383
|
+
Deny = "deny",
|
|
384
|
+
/** Content was modified (e.g., redacted, sanitized, rewritten). */
|
|
385
|
+
Modify = "modify",
|
|
386
|
+
/** Content or action triggered a warning but is allowed to proceed. */
|
|
387
|
+
Warn = "warn"
|
|
388
|
+
}
|
|
389
|
+
/**
|
|
390
|
+
* Well-known severity levels for security risks detected by guardrails.
|
|
391
|
+
*/
|
|
392
|
+
export declare const GuardrailRiskSeverity: {
|
|
393
|
+
/** No risk detected. */
|
|
394
|
+
readonly None: "none";
|
|
395
|
+
/** Low-severity risk. */
|
|
396
|
+
readonly Low: "low";
|
|
397
|
+
/** Medium-severity risk. */
|
|
398
|
+
readonly Medium: "medium";
|
|
399
|
+
/** High-severity risk. */
|
|
400
|
+
readonly High: "high";
|
|
401
|
+
/** Critical-severity risk. */
|
|
402
|
+
readonly Critical: "critical";
|
|
403
|
+
};
|
|
404
|
+
/**
|
|
405
|
+
* Well-known values for the type of content or action a guardrail is applied to.
|
|
406
|
+
* Custom strings are also accepted.
|
|
407
|
+
*/
|
|
408
|
+
export declare const GuardrailTargetType: {
|
|
409
|
+
/** Input sent to an LLM. */
|
|
410
|
+
readonly LlmInput: "llm_input";
|
|
411
|
+
/** Output produced by an LLM. */
|
|
412
|
+
readonly LlmOutput: "llm_output";
|
|
413
|
+
/** A tool invocation. */
|
|
414
|
+
readonly ToolCall: "tool_call";
|
|
415
|
+
/** A tool definition. */
|
|
416
|
+
readonly ToolDefinition: "tool_definition";
|
|
417
|
+
/** A write to a memory store. */
|
|
418
|
+
readonly MemoryStore: "memory_store";
|
|
419
|
+
/** A read from a memory store. */
|
|
420
|
+
readonly MemoryRetrieve: "memory_retrieve";
|
|
421
|
+
/** A query against a knowledge source. */
|
|
422
|
+
readonly KnowledgeQuery: "knowledge_query";
|
|
423
|
+
/** A result returned from a knowledge source. */
|
|
424
|
+
readonly KnowledgeResult: "knowledge_result";
|
|
425
|
+
/** A generic message. */
|
|
426
|
+
readonly Message: "message";
|
|
427
|
+
};
|
|
428
|
+
/**
|
|
429
|
+
* Details of a guardrail evaluation for security operations tracing.
|
|
430
|
+
*/
|
|
431
|
+
export interface GuardrailDetails {
|
|
432
|
+
/** The type of content or action the guardrail is applied to (required). */
|
|
433
|
+
targetType: string;
|
|
434
|
+
/** The decision made by the guardian (required). */
|
|
435
|
+
decisionType: GuardrailDecisionType;
|
|
436
|
+
/** Human-readable name of the guardian. */
|
|
437
|
+
guardianName?: string;
|
|
438
|
+
/** Unique identifier of the guardian. */
|
|
439
|
+
guardianId?: string;
|
|
440
|
+
/** Provider of the guardian service (e.g., azure.ai.content_safety). */
|
|
441
|
+
guardianProviderName?: string;
|
|
442
|
+
/** Version of the guardian. */
|
|
443
|
+
guardianVersion?: string;
|
|
444
|
+
/** Identifier of the target being guarded. */
|
|
445
|
+
targetId?: string;
|
|
446
|
+
/** Human-readable explanation for the decision. */
|
|
447
|
+
decisionReason?: string;
|
|
448
|
+
/** Machine-readable decision code. */
|
|
449
|
+
decisionCode?: string;
|
|
450
|
+
/** Identifier of the policy that triggered the decision. */
|
|
451
|
+
policyId?: string;
|
|
452
|
+
/** Human-readable name of the policy. */
|
|
453
|
+
policyName?: string;
|
|
454
|
+
/** Version of the policy. */
|
|
455
|
+
policyVersion?: string;
|
|
456
|
+
/** Hash of the input content for forensic correlation. */
|
|
457
|
+
contentInputHash?: string;
|
|
458
|
+
/** Whether content was modified by the guardrail. */
|
|
459
|
+
contentModified?: boolean;
|
|
460
|
+
/** External correlation identifier for SIEM systems. */
|
|
461
|
+
externalEventId?: string;
|
|
462
|
+
}
|
|
463
|
+
/**
|
|
464
|
+
* Represents a single security finding detected during guardian evaluation.
|
|
465
|
+
* Multiple findings may be emitted for a single guardrail span.
|
|
466
|
+
*/
|
|
467
|
+
export interface GuardrailFinding {
|
|
468
|
+
/** The category of security risk detected (required). */
|
|
469
|
+
riskCategory: string;
|
|
470
|
+
/** The severity level of the detected risk (required). */
|
|
471
|
+
riskSeverity: string;
|
|
472
|
+
/** The decision type for this specific policy finding. */
|
|
473
|
+
policyDecisionType?: string;
|
|
474
|
+
/** Identifier of the policy that triggered the finding. */
|
|
475
|
+
policyId?: string;
|
|
476
|
+
/** Human-readable name of the triggered policy. */
|
|
477
|
+
policyName?: string;
|
|
478
|
+
/** Version of the policy. */
|
|
479
|
+
policyVersion?: string;
|
|
480
|
+
/** Numeric risk/confidence score (0.0 to 1.0). */
|
|
481
|
+
riskScore?: number;
|
|
482
|
+
/**
|
|
483
|
+
* Non-content metadata about the detected risk (MUST NOT contain PII).
|
|
484
|
+
* Example values: "field:bcc", "pattern:ssn", "count:3".
|
|
485
|
+
*/
|
|
486
|
+
riskMetadata?: string[];
|
|
487
|
+
}
|
|
250
488
|
//# sourceMappingURL=contracts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../../../src/a365/contracts.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAMzF,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../../../src/a365/contracts.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAMzF,2EAA2E;AAC3E,eAAO,MAAM,qBAAqB,EAAG,MAAe,CAAC;AAMrD,0EAA0E;AAC1E,oBAAY,W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|
// Licensed under the MIT License.
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.InferenceOperationType = exports.InvocationRole = exports.Modality = exports.FinishReason = exports.MessageRole = exports.
|
|
5
|
+
exports.GuardrailTargetType = exports.GuardrailRiskSeverity = exports.GuardrailDecisionType = exports.InferenceOperationType = exports.InvocationRole = exports.Modality = exports.FinishReason = exports.MessageRole = exports.DEFAULT_FINISH_REASON = void 0;
|
|
6
6
|
// ---------------------------------------------------------------------------
|
|
7
|
-
//
|
|
7
|
+
// Default finish reason (per OTel spec)
|
|
8
8
|
// ---------------------------------------------------------------------------
|
|
9
|
-
|
|
9
|
+
/** Default finish reason applied when none is provided (per OTel spec). */
|
|
10
|
+
exports.DEFAULT_FINISH_REASON = "stop";
|
|
10
11
|
// ---------------------------------------------------------------------------
|
|
11
12
|
// Enums
|
|
12
13
|
// ---------------------------------------------------------------------------
|
|
13
14
|
/** Role of a message participant per OTEL gen-ai semantic conventions. */
|
|
14
15
|
var MessageRole;
|
|
15
16
|
(function (MessageRole) {
|
|
17
|
+
/** A system / developer instruction message. */
|
|
16
18
|
MessageRole["SYSTEM"] = "system";
|
|
19
|
+
/** A message authored by the end user. */
|
|
17
20
|
MessageRole["USER"] = "user";
|
|
21
|
+
/** A message authored by the model/assistant. */
|
|
18
22
|
MessageRole["ASSISTANT"] = "assistant";
|
|
23
|
+
/** A message containing the result of a tool call. */
|
|
19
24
|
MessageRole["TOOL"] = "tool";
|
|
20
25
|
})(MessageRole || (exports.MessageRole = MessageRole = {}));
|
|
21
26
|
/** Reason a model stopped generating per OTEL gen-ai semantic conventions. */
|
|
22
27
|
var FinishReason;
|
|
23
28
|
(function (FinishReason) {
|
|
29
|
+
/** The model reached a natural stopping point or a provided stop sequence. */
|
|
24
30
|
FinishReason["STOP"] = "stop";
|
|
31
|
+
/** Generation stopped because the maximum token limit was reached. */
|
|
25
32
|
FinishReason["LENGTH"] = "length";
|
|
33
|
+
/** Generation was stopped by a content filter. */
|
|
26
34
|
FinishReason["CONTENT_FILTER"] = "content_filter";
|
|
35
|
+
/** The model emitted a tool call and is awaiting its result. */
|
|
27
36
|
FinishReason["TOOL_CALL"] = "tool_call";
|
|
37
|
+
/** Generation stopped because of an error. */
|
|
28
38
|
FinishReason["ERROR"] = "error";
|
|
29
39
|
})(FinishReason || (exports.FinishReason = FinishReason = {}));
|
|
30
40
|
/** Media modality for blob, file, and URI parts. */
|
|
31
41
|
var Modality;
|
|
32
42
|
(function (Modality) {
|
|
43
|
+
/** Image content. */
|
|
33
44
|
Modality["IMAGE"] = "image";
|
|
45
|
+
/** Video content. */
|
|
34
46
|
Modality["VIDEO"] = "video";
|
|
47
|
+
/** Audio content. */
|
|
35
48
|
Modality["AUDIO"] = "audio";
|
|
36
49
|
})(Modality || (exports.Modality = Modality = {}));
|
|
37
50
|
/** Represents different roles that can invoke an agent. */
|
|
38
51
|
var InvocationRole;
|
|
39
52
|
(function (InvocationRole) {
|
|
53
|
+
/** The agent was invoked by a human user. */
|
|
40
54
|
InvocationRole["Human"] = "Human";
|
|
55
|
+
/** The agent was invoked by another agent. */
|
|
41
56
|
InvocationRole["Agent"] = "Agent";
|
|
57
|
+
/** The agent was invoked by a system event or trigger. */
|
|
42
58
|
InvocationRole["Event"] = "Event";
|
|
59
|
+
/** The invoking role could not be determined. */
|
|
43
60
|
InvocationRole["Unknown"] = "Unknown";
|
|
44
61
|
})(InvocationRole || (exports.InvocationRole = InvocationRole = {}));
|
|
45
62
|
/** Represents different operation types for model inference. */
|
|
46
63
|
var InferenceOperationType;
|
|
47
64
|
(function (InferenceOperationType) {
|
|
65
|
+
/** A chat-completion request. */
|
|
48
66
|
InferenceOperationType["CHAT"] = "Chat";
|
|
67
|
+
/** A text-completion request. */
|
|
49
68
|
InferenceOperationType["TEXT_COMPLETION"] = "TextCompletion";
|
|
69
|
+
/** A multimodal content-generation request. */
|
|
50
70
|
InferenceOperationType["GENERATE_CONTENT"] = "GenerateContent";
|
|
51
71
|
})(InferenceOperationType || (exports.InferenceOperationType = InferenceOperationType = {}));
|
|
72
|
+
// ---------------------------------------------------------------------------
|
|
73
|
+
// Guardrail / Security Contracts
|
|
74
|
+
// ---------------------------------------------------------------------------
|
|
75
|
+
/**
|
|
76
|
+
* The decision made by a security guardian during guardrail evaluation.
|
|
77
|
+
*/
|
|
78
|
+
var GuardrailDecisionType;
|
|
79
|
+
(function (GuardrailDecisionType) {
|
|
80
|
+
/** Content or action is allowed to proceed. */
|
|
81
|
+
GuardrailDecisionType["Allow"] = "allow";
|
|
82
|
+
/** Content or action is logged for review but allowed to proceed. */
|
|
83
|
+
GuardrailDecisionType["Audit"] = "audit";
|
|
84
|
+
/** Content or action is denied/blocked. */
|
|
85
|
+
GuardrailDecisionType["Deny"] = "deny";
|
|
86
|
+
/** Content was modified (e.g., redacted, sanitized, rewritten). */
|
|
87
|
+
GuardrailDecisionType["Modify"] = "modify";
|
|
88
|
+
/** Content or action triggered a warning but is allowed to proceed. */
|
|
89
|
+
GuardrailDecisionType["Warn"] = "warn";
|
|
90
|
+
})(GuardrailDecisionType || (exports.GuardrailDecisionType = GuardrailDecisionType = {}));
|
|
91
|
+
/**
|
|
92
|
+
* Well-known severity levels for security risks detected by guardrails.
|
|
93
|
+
*/
|
|
94
|
+
exports.GuardrailRiskSeverity = {
|
|
95
|
+
/** No risk detected. */
|
|
96
|
+
None: "none",
|
|
97
|
+
/** Low-severity risk. */
|
|
98
|
+
Low: "low",
|
|
99
|
+
/** Medium-severity risk. */
|
|
100
|
+
Medium: "medium",
|
|
101
|
+
/** High-severity risk. */
|
|
102
|
+
High: "high",
|
|
103
|
+
/** Critical-severity risk. */
|
|
104
|
+
Critical: "critical",
|
|
105
|
+
};
|
|
106
|
+
/**
|
|
107
|
+
* Well-known values for the type of content or action a guardrail is applied to.
|
|
108
|
+
* Custom strings are also accepted.
|
|
109
|
+
*/
|
|
110
|
+
exports.GuardrailTargetType = {
|
|
111
|
+
/** Input sent to an LLM. */
|
|
112
|
+
LlmInput: "llm_input",
|
|
113
|
+
/** Output produced by an LLM. */
|
|
114
|
+
LlmOutput: "llm_output",
|
|
115
|
+
/** A tool invocation. */
|
|
116
|
+
ToolCall: "tool_call",
|
|
117
|
+
/** A tool definition. */
|
|
118
|
+
ToolDefinition: "tool_definition",
|
|
119
|
+
/** A write to a memory store. */
|
|
120
|
+
MemoryStore: "memory_store",
|
|
121
|
+
/** A read from a memory store. */
|
|
122
|
+
MemoryRetrieve: "memory_retrieve",
|
|
123
|
+
/** A query against a knowledge source. */
|
|
124
|
+
KnowledgeQuery: "knowledge_query",
|
|
125
|
+
/** A result returned from a knowledge source. */
|
|
126
|
+
KnowledgeResult: "knowledge_result",
|
|
127
|
+
/** A generic message. */
|
|
128
|
+
Message: "message",
|
|
129
|
+
};
|
|
52
130
|
//# sourceMappingURL=contracts.js.map
|