@iqai/adk 0.6.4 → 0.6.6

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/CHANGELOG.md CHANGED
@@ -1,5 +1,30 @@
1
1
  # @iqai/adk
2
2
 
3
+ ## 0.6.6
4
+
5
+ ### Patch Changes
6
+
7
+ - 78bac0e: Previously, chaining builder methods after `withOutputSchema()` caused TypeScript to lose the inferred output type, resulting in `EnhancedRunner<any, any>` instead of the schema-derived type.
8
+
9
+ This update:
10
+ - Makes all chainable builder methods return `this` to preserve polymorphic typing.
11
+ - Refactors `AgentBuilderWithSchema` using a mapped type that preserves all methods from `AgentBuilder` while correctly typing `build`, `buildWithSchema`, and `ask`.
12
+
13
+ Now, the inferred output type `T` flows correctly through the builder chain, ensuring `BuiltAgent<T, M>` and `EnhancedRunner<T, M>` are fully typed.
14
+
15
+ ## 0.6.5
16
+
17
+ ### Patch Changes
18
+
19
+ - 3666f6e: Introduced backend support for **trace visualization** of agent execution sessions. The system now captures OpenTelemetry spans in-memory (in addition to OTLP export), groups them by `sessionId`, and exposes them via a new debug API. This enables the UI to reconstruct full execution trees and timelines for agents, tools, and LLM calls.
20
+
21
+ **Highlights**
22
+ - In-memory span storage with rolling buffer scoped per session
23
+ - Dual export: OTLP + in-memory trace store
24
+ - New API: `GET /debug/trace/session/:sessionId`
25
+ - Visualization-ready trace format (IDs, hierarchy, timing, attributes)
26
+ - Designed for local development and debugging workflows
27
+
3
28
  ## 0.6.4
4
29
 
5
30
  ### Patch Changes
@@ -0,0 +1,190 @@
1
+ /**
2
+ * Semantic Conventions and Constants
3
+ * OpenTelemetry semantic conventions for ADK telemetry
4
+ */
5
+ /**
6
+ * Standard OpenTelemetry GenAI semantic conventions
7
+ * Reference: https://opentelemetry.io/docs/specs/semconv/gen-ai/
8
+ * Version: v1.38.0 (development status)
9
+ */
10
+ declare const SEMCONV: {
11
+ readonly GEN_AI_PROVIDER_NAME: "gen_ai.provider.name";
12
+ readonly GEN_AI_OPERATION_NAME: "gen_ai.operation.name";
13
+ readonly GEN_AI_AGENT_ID: "gen_ai.agent.id";
14
+ readonly GEN_AI_AGENT_NAME: "gen_ai.agent.name";
15
+ readonly GEN_AI_AGENT_DESCRIPTION: "gen_ai.agent.description";
16
+ readonly GEN_AI_CONVERSATION_ID: "gen_ai.conversation.id";
17
+ readonly GEN_AI_TOOL_NAME: "gen_ai.tool.name";
18
+ readonly GEN_AI_TOOL_DESCRIPTION: "gen_ai.tool.description";
19
+ readonly GEN_AI_TOOL_TYPE: "gen_ai.tool.type";
20
+ readonly GEN_AI_TOOL_CALL_ID: "gen_ai.tool.call.id";
21
+ readonly GEN_AI_TOOL_CALL_ARGUMENTS: "gen_ai.tool.call.arguments";
22
+ readonly GEN_AI_TOOL_CALL_RESULT: "gen_ai.tool.call.result";
23
+ readonly GEN_AI_TOOL_DEFINITIONS: "gen_ai.tool.definitions";
24
+ readonly GEN_AI_REQUEST_MODEL: "gen_ai.request.model";
25
+ readonly GEN_AI_REQUEST_MAX_TOKENS: "gen_ai.request.max_tokens";
26
+ readonly GEN_AI_REQUEST_TEMPERATURE: "gen_ai.request.temperature";
27
+ readonly GEN_AI_REQUEST_TOP_P: "gen_ai.request.top_p";
28
+ readonly GEN_AI_REQUEST_TOP_K: "gen_ai.request.top_k";
29
+ readonly GEN_AI_REQUEST_FREQUENCY_PENALTY: "gen_ai.request.frequency_penalty";
30
+ readonly GEN_AI_REQUEST_PRESENCE_PENALTY: "gen_ai.request.presence_penalty";
31
+ readonly GEN_AI_REQUEST_STOP_SEQUENCES: "gen_ai.request.stop_sequences";
32
+ readonly GEN_AI_REQUEST_CHOICE_COUNT: "gen_ai.request.choice.count";
33
+ readonly GEN_AI_REQUEST_SEED: "gen_ai.request.seed";
34
+ readonly GEN_AI_RESPONSE_ID: "gen_ai.response.id";
35
+ readonly GEN_AI_RESPONSE_MODEL: "gen_ai.response.model";
36
+ readonly GEN_AI_RESPONSE_FINISH_REASONS: "gen_ai.response.finish_reasons";
37
+ readonly GEN_AI_OUTPUT_TYPE: "gen_ai.output.type";
38
+ readonly GEN_AI_USAGE_INPUT_TOKENS: "gen_ai.usage.input_tokens";
39
+ readonly GEN_AI_USAGE_OUTPUT_TOKENS: "gen_ai.usage.output_tokens";
40
+ readonly GEN_AI_SYSTEM_INSTRUCTIONS: "gen_ai.system_instructions";
41
+ readonly GEN_AI_INPUT_MESSAGES: "gen_ai.input.messages";
42
+ readonly GEN_AI_OUTPUT_MESSAGES: "gen_ai.output.messages";
43
+ readonly SERVER_ADDRESS: "server.address";
44
+ readonly SERVER_PORT: "server.port";
45
+ readonly ERROR_TYPE: "error.type";
46
+ readonly GEN_AI_DATA_SOURCE_ID: "gen_ai.data_source.id";
47
+ readonly GEN_AI_EMBEDDINGS_DIMENSION_COUNT: "gen_ai.embeddings.dimension.count";
48
+ readonly GEN_AI_REQUEST_ENCODING_FORMATS: "gen_ai.request.encoding_formats";
49
+ /**
50
+ * @deprecated Use GEN_AI_PROVIDER_NAME instead
51
+ */
52
+ readonly GEN_AI_SYSTEM: "gen_ai.system";
53
+ /**
54
+ * @deprecated Total tokens should be computed client-side from input + output
55
+ */
56
+ readonly GEN_AI_USAGE_TOTAL_TOKENS: "gen_ai.usage.total_tokens";
57
+ /**
58
+ * @deprecated Use GEN_AI_INPUT_MESSAGES or structured events instead
59
+ */
60
+ readonly GEN_AI_CONTENT_PROMPT: "gen_ai.content.prompt";
61
+ /**
62
+ * @deprecated Use GEN_AI_OUTPUT_MESSAGES or structured events instead
63
+ */
64
+ readonly GEN_AI_CONTENT_COMPLETION: "gen_ai.content.completion";
65
+ };
66
+ /**
67
+ * ADK-specific attribute namespace
68
+ * Custom attributes for IQAI ADK framework
69
+ */
70
+ declare const ADK_ATTRS: {
71
+ readonly SYSTEM_NAME: "adk.system.name";
72
+ readonly SYSTEM_VERSION: "adk.system.version";
73
+ readonly SESSION_ID: "adk.session.id";
74
+ readonly USER_ID: "adk.user.id";
75
+ readonly INVOCATION_ID: "adk.invocation.id";
76
+ readonly EVENT_ID: "adk.event.id";
77
+ readonly ENVIRONMENT: "adk.environment";
78
+ readonly AGENT_NAME: "adk.agent.name";
79
+ readonly AGENT_DESCRIPTION: "adk.agent.description";
80
+ readonly TRANSFER_SOURCE_AGENT: "adk.transfer.source_agent";
81
+ readonly TRANSFER_TARGET_AGENT: "adk.transfer.target_agent";
82
+ readonly TRANSFER_CHAIN: "adk.transfer.chain";
83
+ readonly TRANSFER_DEPTH: "adk.transfer.depth";
84
+ readonly TRANSFER_ROOT_AGENT: "adk.transfer.root_agent";
85
+ readonly TRANSFER_REASON: "adk.transfer.reason";
86
+ readonly TOOL_NAME: "adk.tool.name";
87
+ readonly TOOL_ARGS: "adk.tool.args";
88
+ readonly TOOL_RESPONSE: "adk.tool.response";
89
+ readonly TOOL_EXECUTION_ORDER: "adk.tool.execution_order";
90
+ readonly TOOL_PARALLEL_GROUP: "adk.tool.parallel_group";
91
+ readonly TOOL_RETRY_COUNT: "adk.tool.retry_count";
92
+ readonly TOOL_IS_CALLBACK_OVERRIDE: "adk.tool.is_callback_override";
93
+ readonly LLM_MODEL: "adk.llm.model";
94
+ readonly LLM_REQUEST: "adk.llm.request";
95
+ readonly LLM_RESPONSE: "adk.llm.response";
96
+ readonly LLM_STREAMING: "adk.llm.streaming";
97
+ readonly LLM_TIME_TO_FIRST_TOKEN: "adk.llm.time_to_first_token_ms";
98
+ readonly LLM_CHUNK_COUNT: "adk.llm.chunk_count";
99
+ readonly LLM_CACHED_TOKENS: "adk.llm.cached_tokens";
100
+ readonly LLM_CONTEXT_WINDOW_USED_PCT: "adk.llm.context_window_used_pct";
101
+ readonly CALLBACK_TYPE: "adk.callback.type";
102
+ readonly CALLBACK_NAME: "adk.callback.name";
103
+ readonly CALLBACK_INDEX: "adk.callback.index";
104
+ readonly ERROR_CATEGORY: "adk.error.category";
105
+ readonly ERROR_RECOVERABLE: "adk.error.recoverable";
106
+ readonly ERROR_RETRY_RECOMMENDED: "adk.error.retry_recommended";
107
+ readonly MEMORY_QUERY: "adk.memory.query";
108
+ readonly MEMORY_RESULTS_COUNT: "adk.memory.results_count";
109
+ readonly PLUGIN_NAME: "adk.plugin.name";
110
+ readonly PLUGIN_HOOK: "adk.plugin.hook";
111
+ };
112
+ /**
113
+ * Operation names for different trace operations
114
+ * Reference: https://opentelemetry.io/docs/specs/semconv/gen-ai/gen-ai-spans/
115
+ */
116
+ declare const OPERATIONS: {
117
+ readonly CHAT: "chat";
118
+ readonly TEXT_COMPLETION: "text_completion";
119
+ readonly GENERATE_CONTENT: "generate_content";
120
+ readonly INVOKE_AGENT: "invoke_agent";
121
+ readonly CREATE_AGENT: "create_agent";
122
+ readonly EXECUTE_TOOL: "execute_tool";
123
+ readonly TRANSFER_AGENT: "transfer_agent";
124
+ readonly EXECUTE_CALLBACK: "execute_callback";
125
+ readonly SEARCH_MEMORY: "search_memory";
126
+ readonly INSERT_MEMORY: "insert_memory";
127
+ readonly EXECUTE_PLUGIN: "execute_plugin";
128
+ /**
129
+ * @deprecated Use CHAT, TEXT_COMPLETION, or GENERATE_CONTENT instead
130
+ */
131
+ readonly CALL_LLM: "call_llm";
132
+ };
133
+ /**
134
+ * System identifier for IQAI ADK
135
+ */
136
+ declare const ADK_SYSTEM_NAME = "iqai-adk";
137
+ /**
138
+ * Environment variable names
139
+ */
140
+ declare const ENV_VARS: {
141
+ readonly CAPTURE_MESSAGE_CONTENT: "ADK_CAPTURE_MESSAGE_CONTENT";
142
+ readonly OTEL_SERVICE_NAME: "OTEL_SERVICE_NAME";
143
+ readonly OTEL_RESOURCE_ATTRIBUTES: "OTEL_RESOURCE_ATTRIBUTES";
144
+ readonly OTEL_EXPORTER_OTLP_ENDPOINT: "OTEL_EXPORTER_OTLP_ENDPOINT";
145
+ readonly OTEL_EXPORTER_OTLP_HEADERS: "OTEL_EXPORTER_OTLP_HEADERS";
146
+ readonly NODE_ENV: "NODE_ENV";
147
+ };
148
+ /**
149
+ * Metric names
150
+ * Includes both standard OpenTelemetry GenAI metrics and ADK-specific metrics
151
+ */
152
+ declare const METRICS: {
153
+ readonly GEN_AI_CLIENT_OPERATION_DURATION: "gen_ai.client.operation.duration";
154
+ readonly GEN_AI_CLIENT_TOKEN_USAGE: "gen_ai.client.token.usage";
155
+ readonly GEN_AI_SERVER_REQUEST_DURATION: "gen_ai.server.request.duration";
156
+ readonly GEN_AI_SERVER_TIME_TO_FIRST_TOKEN: "gen_ai.server.time_to_first_token";
157
+ readonly GEN_AI_SERVER_TIME_PER_OUTPUT_TOKEN: "gen_ai.server.time_per_output_token";
158
+ readonly AGENT_INVOCATIONS: "adk.agent.invocations";
159
+ readonly TOOL_EXECUTIONS: "adk.tool.executions";
160
+ readonly LLM_CALLS: "adk.llm.calls";
161
+ readonly ERRORS: "adk.errors";
162
+ readonly AGENT_DURATION: "adk.agent.duration";
163
+ readonly TOOL_DURATION: "adk.tool.duration";
164
+ readonly LLM_DURATION: "adk.llm.duration";
165
+ readonly LLM_TOKENS: "adk.llm.tokens";
166
+ readonly LLM_INPUT_TOKENS: "adk.llm.tokens.input";
167
+ readonly LLM_OUTPUT_TOKENS: "adk.llm.tokens.output";
168
+ };
169
+ /**
170
+ * Span status codes
171
+ */
172
+ declare const SPAN_STATUS: {
173
+ readonly UNSET: 0;
174
+ readonly OK: 1;
175
+ readonly ERROR: 2;
176
+ };
177
+ /**
178
+ * Default configuration values
179
+ */
180
+ declare const DEFAULTS: {
181
+ readonly SAMPLING_RATIO: 1;
182
+ readonly METRIC_EXPORT_INTERVAL_MS: 60000;
183
+ readonly SHUTDOWN_TIMEOUT_MS: 5000;
184
+ readonly CAPTURE_MESSAGE_CONTENT: true;
185
+ readonly ENABLE_TRACING: true;
186
+ readonly ENABLE_METRICS: true;
187
+ readonly ENABLE_AUTO_INSTRUMENTATION: false;
188
+ };
189
+
190
+ export { ADK_ATTRS, ADK_SYSTEM_NAME, DEFAULTS, ENV_VARS, METRICS, OPERATIONS, SEMCONV, SPAN_STATUS };
@@ -0,0 +1,190 @@
1
+ /**
2
+ * Semantic Conventions and Constants
3
+ * OpenTelemetry semantic conventions for ADK telemetry
4
+ */
5
+ /**
6
+ * Standard OpenTelemetry GenAI semantic conventions
7
+ * Reference: https://opentelemetry.io/docs/specs/semconv/gen-ai/
8
+ * Version: v1.38.0 (development status)
9
+ */
10
+ declare const SEMCONV: {
11
+ readonly GEN_AI_PROVIDER_NAME: "gen_ai.provider.name";
12
+ readonly GEN_AI_OPERATION_NAME: "gen_ai.operation.name";
13
+ readonly GEN_AI_AGENT_ID: "gen_ai.agent.id";
14
+ readonly GEN_AI_AGENT_NAME: "gen_ai.agent.name";
15
+ readonly GEN_AI_AGENT_DESCRIPTION: "gen_ai.agent.description";
16
+ readonly GEN_AI_CONVERSATION_ID: "gen_ai.conversation.id";
17
+ readonly GEN_AI_TOOL_NAME: "gen_ai.tool.name";
18
+ readonly GEN_AI_TOOL_DESCRIPTION: "gen_ai.tool.description";
19
+ readonly GEN_AI_TOOL_TYPE: "gen_ai.tool.type";
20
+ readonly GEN_AI_TOOL_CALL_ID: "gen_ai.tool.call.id";
21
+ readonly GEN_AI_TOOL_CALL_ARGUMENTS: "gen_ai.tool.call.arguments";
22
+ readonly GEN_AI_TOOL_CALL_RESULT: "gen_ai.tool.call.result";
23
+ readonly GEN_AI_TOOL_DEFINITIONS: "gen_ai.tool.definitions";
24
+ readonly GEN_AI_REQUEST_MODEL: "gen_ai.request.model";
25
+ readonly GEN_AI_REQUEST_MAX_TOKENS: "gen_ai.request.max_tokens";
26
+ readonly GEN_AI_REQUEST_TEMPERATURE: "gen_ai.request.temperature";
27
+ readonly GEN_AI_REQUEST_TOP_P: "gen_ai.request.top_p";
28
+ readonly GEN_AI_REQUEST_TOP_K: "gen_ai.request.top_k";
29
+ readonly GEN_AI_REQUEST_FREQUENCY_PENALTY: "gen_ai.request.frequency_penalty";
30
+ readonly GEN_AI_REQUEST_PRESENCE_PENALTY: "gen_ai.request.presence_penalty";
31
+ readonly GEN_AI_REQUEST_STOP_SEQUENCES: "gen_ai.request.stop_sequences";
32
+ readonly GEN_AI_REQUEST_CHOICE_COUNT: "gen_ai.request.choice.count";
33
+ readonly GEN_AI_REQUEST_SEED: "gen_ai.request.seed";
34
+ readonly GEN_AI_RESPONSE_ID: "gen_ai.response.id";
35
+ readonly GEN_AI_RESPONSE_MODEL: "gen_ai.response.model";
36
+ readonly GEN_AI_RESPONSE_FINISH_REASONS: "gen_ai.response.finish_reasons";
37
+ readonly GEN_AI_OUTPUT_TYPE: "gen_ai.output.type";
38
+ readonly GEN_AI_USAGE_INPUT_TOKENS: "gen_ai.usage.input_tokens";
39
+ readonly GEN_AI_USAGE_OUTPUT_TOKENS: "gen_ai.usage.output_tokens";
40
+ readonly GEN_AI_SYSTEM_INSTRUCTIONS: "gen_ai.system_instructions";
41
+ readonly GEN_AI_INPUT_MESSAGES: "gen_ai.input.messages";
42
+ readonly GEN_AI_OUTPUT_MESSAGES: "gen_ai.output.messages";
43
+ readonly SERVER_ADDRESS: "server.address";
44
+ readonly SERVER_PORT: "server.port";
45
+ readonly ERROR_TYPE: "error.type";
46
+ readonly GEN_AI_DATA_SOURCE_ID: "gen_ai.data_source.id";
47
+ readonly GEN_AI_EMBEDDINGS_DIMENSION_COUNT: "gen_ai.embeddings.dimension.count";
48
+ readonly GEN_AI_REQUEST_ENCODING_FORMATS: "gen_ai.request.encoding_formats";
49
+ /**
50
+ * @deprecated Use GEN_AI_PROVIDER_NAME instead
51
+ */
52
+ readonly GEN_AI_SYSTEM: "gen_ai.system";
53
+ /**
54
+ * @deprecated Total tokens should be computed client-side from input + output
55
+ */
56
+ readonly GEN_AI_USAGE_TOTAL_TOKENS: "gen_ai.usage.total_tokens";
57
+ /**
58
+ * @deprecated Use GEN_AI_INPUT_MESSAGES or structured events instead
59
+ */
60
+ readonly GEN_AI_CONTENT_PROMPT: "gen_ai.content.prompt";
61
+ /**
62
+ * @deprecated Use GEN_AI_OUTPUT_MESSAGES or structured events instead
63
+ */
64
+ readonly GEN_AI_CONTENT_COMPLETION: "gen_ai.content.completion";
65
+ };
66
+ /**
67
+ * ADK-specific attribute namespace
68
+ * Custom attributes for IQAI ADK framework
69
+ */
70
+ declare const ADK_ATTRS: {
71
+ readonly SYSTEM_NAME: "adk.system.name";
72
+ readonly SYSTEM_VERSION: "adk.system.version";
73
+ readonly SESSION_ID: "adk.session.id";
74
+ readonly USER_ID: "adk.user.id";
75
+ readonly INVOCATION_ID: "adk.invocation.id";
76
+ readonly EVENT_ID: "adk.event.id";
77
+ readonly ENVIRONMENT: "adk.environment";
78
+ readonly AGENT_NAME: "adk.agent.name";
79
+ readonly AGENT_DESCRIPTION: "adk.agent.description";
80
+ readonly TRANSFER_SOURCE_AGENT: "adk.transfer.source_agent";
81
+ readonly TRANSFER_TARGET_AGENT: "adk.transfer.target_agent";
82
+ readonly TRANSFER_CHAIN: "adk.transfer.chain";
83
+ readonly TRANSFER_DEPTH: "adk.transfer.depth";
84
+ readonly TRANSFER_ROOT_AGENT: "adk.transfer.root_agent";
85
+ readonly TRANSFER_REASON: "adk.transfer.reason";
86
+ readonly TOOL_NAME: "adk.tool.name";
87
+ readonly TOOL_ARGS: "adk.tool.args";
88
+ readonly TOOL_RESPONSE: "adk.tool.response";
89
+ readonly TOOL_EXECUTION_ORDER: "adk.tool.execution_order";
90
+ readonly TOOL_PARALLEL_GROUP: "adk.tool.parallel_group";
91
+ readonly TOOL_RETRY_COUNT: "adk.tool.retry_count";
92
+ readonly TOOL_IS_CALLBACK_OVERRIDE: "adk.tool.is_callback_override";
93
+ readonly LLM_MODEL: "adk.llm.model";
94
+ readonly LLM_REQUEST: "adk.llm.request";
95
+ readonly LLM_RESPONSE: "adk.llm.response";
96
+ readonly LLM_STREAMING: "adk.llm.streaming";
97
+ readonly LLM_TIME_TO_FIRST_TOKEN: "adk.llm.time_to_first_token_ms";
98
+ readonly LLM_CHUNK_COUNT: "adk.llm.chunk_count";
99
+ readonly LLM_CACHED_TOKENS: "adk.llm.cached_tokens";
100
+ readonly LLM_CONTEXT_WINDOW_USED_PCT: "adk.llm.context_window_used_pct";
101
+ readonly CALLBACK_TYPE: "adk.callback.type";
102
+ readonly CALLBACK_NAME: "adk.callback.name";
103
+ readonly CALLBACK_INDEX: "adk.callback.index";
104
+ readonly ERROR_CATEGORY: "adk.error.category";
105
+ readonly ERROR_RECOVERABLE: "adk.error.recoverable";
106
+ readonly ERROR_RETRY_RECOMMENDED: "adk.error.retry_recommended";
107
+ readonly MEMORY_QUERY: "adk.memory.query";
108
+ readonly MEMORY_RESULTS_COUNT: "adk.memory.results_count";
109
+ readonly PLUGIN_NAME: "adk.plugin.name";
110
+ readonly PLUGIN_HOOK: "adk.plugin.hook";
111
+ };
112
+ /**
113
+ * Operation names for different trace operations
114
+ * Reference: https://opentelemetry.io/docs/specs/semconv/gen-ai/gen-ai-spans/
115
+ */
116
+ declare const OPERATIONS: {
117
+ readonly CHAT: "chat";
118
+ readonly TEXT_COMPLETION: "text_completion";
119
+ readonly GENERATE_CONTENT: "generate_content";
120
+ readonly INVOKE_AGENT: "invoke_agent";
121
+ readonly CREATE_AGENT: "create_agent";
122
+ readonly EXECUTE_TOOL: "execute_tool";
123
+ readonly TRANSFER_AGENT: "transfer_agent";
124
+ readonly EXECUTE_CALLBACK: "execute_callback";
125
+ readonly SEARCH_MEMORY: "search_memory";
126
+ readonly INSERT_MEMORY: "insert_memory";
127
+ readonly EXECUTE_PLUGIN: "execute_plugin";
128
+ /**
129
+ * @deprecated Use CHAT, TEXT_COMPLETION, or GENERATE_CONTENT instead
130
+ */
131
+ readonly CALL_LLM: "call_llm";
132
+ };
133
+ /**
134
+ * System identifier for IQAI ADK
135
+ */
136
+ declare const ADK_SYSTEM_NAME = "iqai-adk";
137
+ /**
138
+ * Environment variable names
139
+ */
140
+ declare const ENV_VARS: {
141
+ readonly CAPTURE_MESSAGE_CONTENT: "ADK_CAPTURE_MESSAGE_CONTENT";
142
+ readonly OTEL_SERVICE_NAME: "OTEL_SERVICE_NAME";
143
+ readonly OTEL_RESOURCE_ATTRIBUTES: "OTEL_RESOURCE_ATTRIBUTES";
144
+ readonly OTEL_EXPORTER_OTLP_ENDPOINT: "OTEL_EXPORTER_OTLP_ENDPOINT";
145
+ readonly OTEL_EXPORTER_OTLP_HEADERS: "OTEL_EXPORTER_OTLP_HEADERS";
146
+ readonly NODE_ENV: "NODE_ENV";
147
+ };
148
+ /**
149
+ * Metric names
150
+ * Includes both standard OpenTelemetry GenAI metrics and ADK-specific metrics
151
+ */
152
+ declare const METRICS: {
153
+ readonly GEN_AI_CLIENT_OPERATION_DURATION: "gen_ai.client.operation.duration";
154
+ readonly GEN_AI_CLIENT_TOKEN_USAGE: "gen_ai.client.token.usage";
155
+ readonly GEN_AI_SERVER_REQUEST_DURATION: "gen_ai.server.request.duration";
156
+ readonly GEN_AI_SERVER_TIME_TO_FIRST_TOKEN: "gen_ai.server.time_to_first_token";
157
+ readonly GEN_AI_SERVER_TIME_PER_OUTPUT_TOKEN: "gen_ai.server.time_per_output_token";
158
+ readonly AGENT_INVOCATIONS: "adk.agent.invocations";
159
+ readonly TOOL_EXECUTIONS: "adk.tool.executions";
160
+ readonly LLM_CALLS: "adk.llm.calls";
161
+ readonly ERRORS: "adk.errors";
162
+ readonly AGENT_DURATION: "adk.agent.duration";
163
+ readonly TOOL_DURATION: "adk.tool.duration";
164
+ readonly LLM_DURATION: "adk.llm.duration";
165
+ readonly LLM_TOKENS: "adk.llm.tokens";
166
+ readonly LLM_INPUT_TOKENS: "adk.llm.tokens.input";
167
+ readonly LLM_OUTPUT_TOKENS: "adk.llm.tokens.output";
168
+ };
169
+ /**
170
+ * Span status codes
171
+ */
172
+ declare const SPAN_STATUS: {
173
+ readonly UNSET: 0;
174
+ readonly OK: 1;
175
+ readonly ERROR: 2;
176
+ };
177
+ /**
178
+ * Default configuration values
179
+ */
180
+ declare const DEFAULTS: {
181
+ readonly SAMPLING_RATIO: 1;
182
+ readonly METRIC_EXPORT_INTERVAL_MS: 60000;
183
+ readonly SHUTDOWN_TIMEOUT_MS: 5000;
184
+ readonly CAPTURE_MESSAGE_CONTENT: true;
185
+ readonly ENABLE_TRACING: true;
186
+ readonly ENABLE_METRICS: true;
187
+ readonly ENABLE_AUTO_INSTRUMENTATION: false;
188
+ };
189
+
190
+ export { ADK_ATTRS, ADK_SYSTEM_NAME, DEFAULTS, ENV_VARS, METRICS, OPERATIONS, SEMCONV, SPAN_STATUS };