@od-oneapp/analytics 2026.1.1301
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 +509 -0
- package/dist/ai-YMnynb-t.mjs +3347 -0
- package/dist/ai-YMnynb-t.mjs.map +1 -0
- package/dist/chunk-DQk6qfdC.mjs +18 -0
- package/dist/client-CTzJVFU5.mjs +9 -0
- package/dist/client-CTzJVFU5.mjs.map +1 -0
- package/dist/client-CcFTauAh.mjs +54 -0
- package/dist/client-CcFTauAh.mjs.map +1 -0
- package/dist/client-CeOLjbac.mjs +281 -0
- package/dist/client-CeOLjbac.mjs.map +1 -0
- package/dist/client-D339NFJS.mjs +267 -0
- package/dist/client-D339NFJS.mjs.map +1 -0
- package/dist/client-next.d.mts +62 -0
- package/dist/client-next.d.mts.map +1 -0
- package/dist/client-next.mjs +525 -0
- package/dist/client-next.mjs.map +1 -0
- package/dist/client.d.mts +30 -0
- package/dist/client.d.mts.map +1 -0
- package/dist/client.mjs +186 -0
- package/dist/client.mjs.map +1 -0
- package/dist/config-DPS6bSYo.d.mts +34 -0
- package/dist/config-DPS6bSYo.d.mts.map +1 -0
- package/dist/config-P6P5adJg.mjs +287 -0
- package/dist/config-P6P5adJg.mjs.map +1 -0
- package/dist/console-8bND3mMU.mjs +128 -0
- package/dist/console-8bND3mMU.mjs.map +1 -0
- package/dist/ecommerce-Cgu4wlux.mjs +993 -0
- package/dist/ecommerce-Cgu4wlux.mjs.map +1 -0
- package/dist/emitters-6-nKo8i-.mjs +208 -0
- package/dist/emitters-6-nKo8i-.mjs.map +1 -0
- package/dist/emitters-DldkVSPp.d.mts +12 -0
- package/dist/emitters-DldkVSPp.d.mts.map +1 -0
- package/dist/index-BfNWgfa5.d.mts +1494 -0
- package/dist/index-BfNWgfa5.d.mts.map +1 -0
- package/dist/index-BkIWe--N.d.mts +953 -0
- package/dist/index-BkIWe--N.d.mts.map +1 -0
- package/dist/index-jPzXRn52.d.mts +184 -0
- package/dist/index-jPzXRn52.d.mts.map +1 -0
- package/dist/manager-DvRRjza6.d.mts +76 -0
- package/dist/manager-DvRRjza6.d.mts.map +1 -0
- package/dist/posthog-bootstrap-CYfIy_WS.mjs +1769 -0
- package/dist/posthog-bootstrap-CYfIy_WS.mjs.map +1 -0
- package/dist/posthog-bootstrap-DWxFrxlt.d.mts +81 -0
- package/dist/posthog-bootstrap-DWxFrxlt.d.mts.map +1 -0
- package/dist/providers-http-client.d.mts +37 -0
- package/dist/providers-http-client.d.mts.map +1 -0
- package/dist/providers-http-client.mjs +320 -0
- package/dist/providers-http-client.mjs.map +1 -0
- package/dist/providers-http-server.d.mts +31 -0
- package/dist/providers-http-server.d.mts.map +1 -0
- package/dist/providers-http-server.mjs +297 -0
- package/dist/providers-http-server.mjs.map +1 -0
- package/dist/providers-http.d.mts +46 -0
- package/dist/providers-http.d.mts.map +1 -0
- package/dist/providers-http.mjs +4 -0
- package/dist/server-edge.d.mts +9 -0
- package/dist/server-edge.d.mts.map +1 -0
- package/dist/server-edge.mjs +373 -0
- package/dist/server-edge.mjs.map +1 -0
- package/dist/server-next.d.mts +67 -0
- package/dist/server-next.d.mts.map +1 -0
- package/dist/server-next.mjs +193 -0
- package/dist/server-next.mjs.map +1 -0
- package/dist/server.d.mts +10 -0
- package/dist/server.mjs +7 -0
- package/dist/service-cYtBBL8x.mjs +945 -0
- package/dist/service-cYtBBL8x.mjs.map +1 -0
- package/dist/shared.d.mts +16 -0
- package/dist/shared.d.mts.map +1 -0
- package/dist/shared.mjs +93 -0
- package/dist/shared.mjs.map +1 -0
- package/dist/types-BxBnNQ0V.d.mts +354 -0
- package/dist/types-BxBnNQ0V.d.mts.map +1 -0
- package/dist/types-CBvxUEaF.d.mts +216 -0
- package/dist/types-CBvxUEaF.d.mts.map +1 -0
- package/dist/types.d.mts +4 -0
- package/dist/types.mjs +0 -0
- package/dist/vercel-types-lwakUfoI.d.mts +102 -0
- package/dist/vercel-types-lwakUfoI.d.mts.map +1 -0
- package/package.json +129 -0
- package/src/client/index.ts +164 -0
- package/src/client/manager.ts +71 -0
- package/src/client/next/components.tsx +270 -0
- package/src/client/next/hooks.ts +217 -0
- package/src/client/next/manager.ts +141 -0
- package/src/client/next.ts +144 -0
- package/src/client-next.ts +101 -0
- package/src/client.ts +89 -0
- package/src/examples/ai-sdk-patterns.ts +583 -0
- package/src/examples/emitter-patterns.ts +476 -0
- package/src/examples/nextjs-emitter-patterns.tsx +403 -0
- package/src/next/app-router.tsx +564 -0
- package/src/next/client.ts +419 -0
- package/src/next/index.ts +84 -0
- package/src/next/middleware.ts +429 -0
- package/src/next/rsc.tsx +300 -0
- package/src/next/server.ts +253 -0
- package/src/next/types.d.ts +220 -0
- package/src/providers/base-provider.ts +419 -0
- package/src/providers/console/client.ts +10 -0
- package/src/providers/console/index.ts +152 -0
- package/src/providers/console/server.ts +6 -0
- package/src/providers/console/types.ts +15 -0
- package/src/providers/http/client.ts +464 -0
- package/src/providers/http/index.ts +30 -0
- package/src/providers/http/server.ts +396 -0
- package/src/providers/http/types.ts +135 -0
- package/src/providers/posthog/client.ts +518 -0
- package/src/providers/posthog/index.ts +11 -0
- package/src/providers/posthog/server.ts +329 -0
- package/src/providers/posthog/types.ts +104 -0
- package/src/providers/segment/client.ts +113 -0
- package/src/providers/segment/index.ts +11 -0
- package/src/providers/segment/server.ts +115 -0
- package/src/providers/segment/types.ts +51 -0
- package/src/providers/vercel/client.ts +102 -0
- package/src/providers/vercel/index.ts +11 -0
- package/src/providers/vercel/server.ts +89 -0
- package/src/providers/vercel/types.ts +27 -0
- package/src/server/index.ts +103 -0
- package/src/server/manager.ts +62 -0
- package/src/server/next.ts +210 -0
- package/src/server-edge.ts +442 -0
- package/src/server-next.ts +39 -0
- package/src/server.ts +106 -0
- package/src/shared/emitters/ai/README.md +981 -0
- package/src/shared/emitters/ai/events/agent.ts +130 -0
- package/src/shared/emitters/ai/events/artifacts.ts +167 -0
- package/src/shared/emitters/ai/events/chat.ts +126 -0
- package/src/shared/emitters/ai/events/chatbot-ecommerce.ts +133 -0
- package/src/shared/emitters/ai/events/completion.ts +103 -0
- package/src/shared/emitters/ai/events/content-generation.ts +347 -0
- package/src/shared/emitters/ai/events/conversation.ts +332 -0
- package/src/shared/emitters/ai/events/product-features.ts +1402 -0
- package/src/shared/emitters/ai/events/streaming.ts +114 -0
- package/src/shared/emitters/ai/events/tool.ts +93 -0
- package/src/shared/emitters/ai/index.ts +69 -0
- package/src/shared/emitters/ai/track-ai-sdk.ts +74 -0
- package/src/shared/emitters/ai/track-ai.ts +50 -0
- package/src/shared/emitters/ai/types.ts +1041 -0
- package/src/shared/emitters/ai/utils.ts +468 -0
- package/src/shared/emitters/ecommerce/events/cart-checkout.ts +106 -0
- package/src/shared/emitters/ecommerce/events/coupon.ts +49 -0
- package/src/shared/emitters/ecommerce/events/engagement.ts +61 -0
- package/src/shared/emitters/ecommerce/events/marketplace.ts +119 -0
- package/src/shared/emitters/ecommerce/events/order.ts +199 -0
- package/src/shared/emitters/ecommerce/events/product.ts +205 -0
- package/src/shared/emitters/ecommerce/events/registry.ts +123 -0
- package/src/shared/emitters/ecommerce/events/wishlist-sharing.ts +140 -0
- package/src/shared/emitters/ecommerce/index.ts +46 -0
- package/src/shared/emitters/ecommerce/track-ecommerce.ts +53 -0
- package/src/shared/emitters/ecommerce/types.ts +314 -0
- package/src/shared/emitters/ecommerce/utils.ts +216 -0
- package/src/shared/emitters/emitter-types.ts +974 -0
- package/src/shared/emitters/emitters.ts +292 -0
- package/src/shared/emitters/helpers.ts +419 -0
- package/src/shared/emitters/index.ts +66 -0
- package/src/shared/index.ts +142 -0
- package/src/shared/ingestion/index.ts +66 -0
- package/src/shared/ingestion/schemas.ts +386 -0
- package/src/shared/ingestion/service.ts +628 -0
- package/src/shared/node22-features.ts +848 -0
- package/src/shared/providers/console-provider.ts +160 -0
- package/src/shared/types/base-types.ts +54 -0
- package/src/shared/types/console-types.ts +19 -0
- package/src/shared/types/posthog-types.ts +131 -0
- package/src/shared/types/segment-types.ts +15 -0
- package/src/shared/types/types.ts +397 -0
- package/src/shared/types/vercel-types.ts +19 -0
- package/src/shared/utils/config-client.ts +19 -0
- package/src/shared/utils/config.ts +250 -0
- package/src/shared/utils/emitter-adapter.ts +212 -0
- package/src/shared/utils/manager.test.ts +36 -0
- package/src/shared/utils/manager.ts +1322 -0
- package/src/shared/utils/posthog-bootstrap.ts +136 -0
- package/src/shared/utils/posthog-client-utils.ts +48 -0
- package/src/shared/utils/posthog-next-utils.ts +282 -0
- package/src/shared/utils/posthog-server-utils.ts +210 -0
- package/src/shared/utils/rate-limit.ts +289 -0
- package/src/shared/utils/security.ts +545 -0
- package/src/shared/utils/validation-client.ts +161 -0
- package/src/shared/utils/validation.ts +399 -0
- package/src/shared.ts +155 -0
- package/src/types/index.ts +62 -0
|
@@ -0,0 +1,953 @@
|
|
|
1
|
+
import { D as EmitterTrackPayload, S as EmitterOptions } from "./types-BxBnNQ0V.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/shared/emitters/ai/track-ai-sdk.d.ts
|
|
4
|
+
interface AISdkEventSpec {
|
|
5
|
+
name: string;
|
|
6
|
+
category: 'ai-sdk';
|
|
7
|
+
properties: Record<string, any>;
|
|
8
|
+
requiredProperties?: string[];
|
|
9
|
+
}
|
|
10
|
+
declare function trackAISDK(eventSpec: AISdkEventSpec, options?: EmitterOptions): EmitterTrackPayload;
|
|
11
|
+
declare function createAISDKTracker<T extends Record<string, any>>(eventFactory: (properties: T) => AISdkEventSpec): (properties: T, options?: EmitterOptions) => EmitterTrackPayload;
|
|
12
|
+
//#endregion
|
|
13
|
+
//#region src/shared/emitters/ai/types.d.ts
|
|
14
|
+
interface BaseAIProperties {
|
|
15
|
+
agent_id?: string | undefined;
|
|
16
|
+
agent_name?: string | undefined;
|
|
17
|
+
conversation_id?: string | undefined;
|
|
18
|
+
message_id?: string | undefined;
|
|
19
|
+
model_id: string;
|
|
20
|
+
model_provider?: 'anthropic' | 'openai' | 'google' | 'perplexity' | 'cohere' | 'mistral' | 'other' | undefined;
|
|
21
|
+
operation_id?: string | undefined;
|
|
22
|
+
session_id?: string | undefined;
|
|
23
|
+
user_id?: string | undefined;
|
|
24
|
+
workspace_id?: string | undefined;
|
|
25
|
+
}
|
|
26
|
+
interface TokenUsageProperties {
|
|
27
|
+
cost?: number;
|
|
28
|
+
cost_currency?: string;
|
|
29
|
+
input_tokens?: number;
|
|
30
|
+
output_tokens?: number;
|
|
31
|
+
total_tokens?: number;
|
|
32
|
+
}
|
|
33
|
+
interface ModelConfigProperties {
|
|
34
|
+
frequency_penalty?: number;
|
|
35
|
+
max_tokens?: number;
|
|
36
|
+
max_output_tokens?: number;
|
|
37
|
+
presence_penalty?: number;
|
|
38
|
+
seed?: number;
|
|
39
|
+
stop_sequences?: string[];
|
|
40
|
+
temperature?: number;
|
|
41
|
+
top_p?: number;
|
|
42
|
+
}
|
|
43
|
+
interface ConversationProperties extends BaseAIProperties {
|
|
44
|
+
conversation_title?: string;
|
|
45
|
+
folder_id?: string;
|
|
46
|
+
is_shared?: boolean;
|
|
47
|
+
parent_conversation_id?: string;
|
|
48
|
+
total_messages?: number;
|
|
49
|
+
conversation_type?: string;
|
|
50
|
+
last_active_timestamp?: number;
|
|
51
|
+
end_reason?: string;
|
|
52
|
+
[key: string]: any;
|
|
53
|
+
}
|
|
54
|
+
interface MessageProperties extends BaseAIProperties, TokenUsageProperties {
|
|
55
|
+
content_length?: number;
|
|
56
|
+
has_attachments?: boolean;
|
|
57
|
+
has_code?: boolean;
|
|
58
|
+
has_images?: boolean;
|
|
59
|
+
is_edited?: boolean;
|
|
60
|
+
is_regenerated?: boolean;
|
|
61
|
+
message_index?: number;
|
|
62
|
+
message_role: 'user' | 'assistant' | 'system' | 'tool';
|
|
63
|
+
parent_message_id?: string;
|
|
64
|
+
response_time_ms?: number;
|
|
65
|
+
finish_reason?: string;
|
|
66
|
+
is_streaming?: boolean;
|
|
67
|
+
message_length?: number;
|
|
68
|
+
edit_type?: string;
|
|
69
|
+
deleted_by?: string;
|
|
70
|
+
[key: string]: any;
|
|
71
|
+
}
|
|
72
|
+
interface RegenerationProperties extends BaseAIProperties {
|
|
73
|
+
attempt_number?: number;
|
|
74
|
+
original_message_id: string;
|
|
75
|
+
reason?: 'user-requested' | 'error-recovery' | 'quality-improvement';
|
|
76
|
+
temperature_adjusted?: boolean;
|
|
77
|
+
[key: string]: any;
|
|
78
|
+
}
|
|
79
|
+
interface MessageEditProperties extends BaseAIProperties {
|
|
80
|
+
edit_type: 'user-message' | 'assistant-message';
|
|
81
|
+
edited_message_id: string;
|
|
82
|
+
new_length?: number;
|
|
83
|
+
original_length?: number;
|
|
84
|
+
[key: string]: any;
|
|
85
|
+
}
|
|
86
|
+
interface BranchProperties extends BaseAIProperties {
|
|
87
|
+
branch_point_message_id: string;
|
|
88
|
+
new_conversation_id: string;
|
|
89
|
+
original_conversation_id: string;
|
|
90
|
+
reason?: 'explore-alternative' | 'correct-error' | 'user-initiated';
|
|
91
|
+
merge_strategy?: string;
|
|
92
|
+
[key: string]: any;
|
|
93
|
+
}
|
|
94
|
+
interface StopGenerationProperties extends BaseAIProperties {
|
|
95
|
+
partial_length?: number;
|
|
96
|
+
stop_reason?: 'user-interrupted' | 'user-stopped' | 'timeout' | 'error';
|
|
97
|
+
tokens_used_at_stop?: number;
|
|
98
|
+
[key: string]: any;
|
|
99
|
+
}
|
|
100
|
+
interface TextGenerationProperties extends BaseAIProperties, TokenUsageProperties {
|
|
101
|
+
content_type: 'general' | 'creative' | 'technical' | 'summary' | 'translation';
|
|
102
|
+
finish_reason?: 'stop' | 'length' | 'content_filter';
|
|
103
|
+
generation_time_ms?: number;
|
|
104
|
+
output_length?: number;
|
|
105
|
+
prompt_length?: number;
|
|
106
|
+
}
|
|
107
|
+
interface CodeGenerationProperties extends BaseAIProperties, TokenUsageProperties {
|
|
108
|
+
code_length?: number;
|
|
109
|
+
has_explanation?: boolean;
|
|
110
|
+
has_tests?: boolean;
|
|
111
|
+
language?: string;
|
|
112
|
+
source?: string;
|
|
113
|
+
task_type?: 'generate' | 'edit' | 'debug' | 'explain' | 'refactor' | 'translate';
|
|
114
|
+
code_type?: string;
|
|
115
|
+
explanation_length?: number;
|
|
116
|
+
explanation_type?: string;
|
|
117
|
+
issues_found?: number;
|
|
118
|
+
refactor_type?: string;
|
|
119
|
+
source_language?: string;
|
|
120
|
+
[key: string]: any;
|
|
121
|
+
}
|
|
122
|
+
interface ImageGenerationProperties extends BaseAIProperties {
|
|
123
|
+
generation_time_ms?: number;
|
|
124
|
+
height?: number;
|
|
125
|
+
image_format?: 'png' | 'jpg' | 'webp';
|
|
126
|
+
model?: string;
|
|
127
|
+
prompt_length?: number;
|
|
128
|
+
quality?: 'standard' | 'hd';
|
|
129
|
+
revisions?: number;
|
|
130
|
+
style?: string;
|
|
131
|
+
width?: number;
|
|
132
|
+
image_type?: string;
|
|
133
|
+
[key: string]: any;
|
|
134
|
+
}
|
|
135
|
+
interface SummaryProperties extends BaseAIProperties, TokenUsageProperties {
|
|
136
|
+
input_length?: number;
|
|
137
|
+
output_length?: number;
|
|
138
|
+
source_type?: 'conversation' | 'document' | 'webpage' | 'code';
|
|
139
|
+
summary_type?: 'brief' | 'detailed' | 'key-points' | 'tldr';
|
|
140
|
+
source_length?: number;
|
|
141
|
+
[key: string]: any;
|
|
142
|
+
}
|
|
143
|
+
interface TranslationProperties extends BaseAIProperties, TokenUsageProperties {
|
|
144
|
+
source_language?: string;
|
|
145
|
+
target_language?: string;
|
|
146
|
+
text_length?: number;
|
|
147
|
+
translation_quality?: 'literal' | 'natural' | 'formal';
|
|
148
|
+
[key: string]: any;
|
|
149
|
+
}
|
|
150
|
+
interface ContentGenerationProperties extends BaseAIProperties, TokenUsageProperties {
|
|
151
|
+
content_type?: string;
|
|
152
|
+
generation_time_ms?: number;
|
|
153
|
+
output_length?: number;
|
|
154
|
+
prompt_length?: number;
|
|
155
|
+
content_length?: number;
|
|
156
|
+
content_format?: string;
|
|
157
|
+
completion_type?: string;
|
|
158
|
+
rewrite_style?: string;
|
|
159
|
+
email_type?: string;
|
|
160
|
+
document_type?: string;
|
|
161
|
+
section_count?: number;
|
|
162
|
+
source_language?: string;
|
|
163
|
+
[key: string]: any;
|
|
164
|
+
}
|
|
165
|
+
interface FileUploadProperties extends BaseAIProperties {
|
|
166
|
+
file_size_bytes?: number;
|
|
167
|
+
file_type: string;
|
|
168
|
+
upload_duration_ms?: number;
|
|
169
|
+
[key: string]: any;
|
|
170
|
+
}
|
|
171
|
+
interface FileAnalysisProperties extends BaseAIProperties, TokenUsageProperties {
|
|
172
|
+
analysis_type: 'read' | 'summarize' | 'extract' | 'question-answer';
|
|
173
|
+
file_id: string;
|
|
174
|
+
file_type: string;
|
|
175
|
+
processing_time_ms?: number;
|
|
176
|
+
[key: string]: any;
|
|
177
|
+
}
|
|
178
|
+
interface ImageAnalysisProperties extends BaseAIProperties, TokenUsageProperties {
|
|
179
|
+
analysis_type: 'describe' | 'ocr' | 'question-answer' | 'object-detection';
|
|
180
|
+
image_id: string;
|
|
181
|
+
image_size_bytes?: number;
|
|
182
|
+
[key: string]: any;
|
|
183
|
+
}
|
|
184
|
+
interface WebSearchProperties extends BaseAIProperties {
|
|
185
|
+
query: string;
|
|
186
|
+
results_count?: number;
|
|
187
|
+
search_duration_ms?: number;
|
|
188
|
+
search_provider?: string;
|
|
189
|
+
[key: string]: any;
|
|
190
|
+
}
|
|
191
|
+
interface WebBrowseProperties extends BaseAIProperties {
|
|
192
|
+
duration_ms?: number;
|
|
193
|
+
page_content_length?: number;
|
|
194
|
+
url: string;
|
|
195
|
+
[key: string]: any;
|
|
196
|
+
}
|
|
197
|
+
interface CitationProperties extends BaseAIProperties {
|
|
198
|
+
citation_count?: number;
|
|
199
|
+
citation_format?: 'inline' | 'footnote' | 'reference-list';
|
|
200
|
+
message_id: string;
|
|
201
|
+
sources?: string[];
|
|
202
|
+
[key: string]: any;
|
|
203
|
+
}
|
|
204
|
+
interface ToolCallProperties extends BaseAIProperties {
|
|
205
|
+
error_message?: string;
|
|
206
|
+
execution_time_ms?: number;
|
|
207
|
+
input_params?: Record<string, any>;
|
|
208
|
+
input_size?: number;
|
|
209
|
+
output_size?: number;
|
|
210
|
+
result_status: 'success' | 'error' | 'timeout';
|
|
211
|
+
tool_name: string;
|
|
212
|
+
tool_type: 'built-in' | 'plugin' | 'custom' | 'api';
|
|
213
|
+
[key: string]: any;
|
|
214
|
+
}
|
|
215
|
+
interface PluginProperties extends BaseAIProperties {
|
|
216
|
+
plugin_id: string;
|
|
217
|
+
plugin_name: string;
|
|
218
|
+
plugin_version?: string;
|
|
219
|
+
[key: string]: any;
|
|
220
|
+
}
|
|
221
|
+
interface APICallProperties extends BaseAIProperties {
|
|
222
|
+
api_endpoint: string;
|
|
223
|
+
api_method?: 'GET' | 'POST' | 'PUT' | 'DELETE';
|
|
224
|
+
response_time_ms?: number;
|
|
225
|
+
status_code?: number;
|
|
226
|
+
[key: string]: any;
|
|
227
|
+
}
|
|
228
|
+
interface ContextProperties extends BaseAIProperties {
|
|
229
|
+
context_length_tokens?: number;
|
|
230
|
+
context_source?: 'history' | 'memory' | 'custom-instructions' | 'system';
|
|
231
|
+
context_type: 'added' | 'updated' | 'pruned' | 'cleared';
|
|
232
|
+
tokens_saved?: number;
|
|
233
|
+
[key: string]: any;
|
|
234
|
+
}
|
|
235
|
+
interface MemoryProperties extends BaseAIProperties {
|
|
236
|
+
memory_id?: string;
|
|
237
|
+
memory_recalled?: boolean;
|
|
238
|
+
memory_type: 'stored' | 'retrieved' | 'updated' | 'cleared';
|
|
239
|
+
relevance_score?: number;
|
|
240
|
+
[key: string]: any;
|
|
241
|
+
}
|
|
242
|
+
interface CustomInstructionsProperties extends BaseAIProperties {
|
|
243
|
+
instructions_length?: number;
|
|
244
|
+
instructions_type: 'created' | 'updated' | 'cleared';
|
|
245
|
+
template_used?: boolean;
|
|
246
|
+
[key: string]: any;
|
|
247
|
+
}
|
|
248
|
+
interface ModelSelectionProperties extends BaseAIProperties {
|
|
249
|
+
previous_model_id?: string;
|
|
250
|
+
reason?: 'user-preference' | 'feature-requirement' | 'cost-optimization';
|
|
251
|
+
selected_model_id: string;
|
|
252
|
+
[key: string]: any;
|
|
253
|
+
}
|
|
254
|
+
interface ParameterAdjustmentProperties extends BaseAIProperties {
|
|
255
|
+
new_value: number | string;
|
|
256
|
+
parameter_name: 'temperature' | 'max_tokens' | 'top_p' | 'frequency_penalty';
|
|
257
|
+
previous_value?: number | string;
|
|
258
|
+
[key: string]: any;
|
|
259
|
+
}
|
|
260
|
+
interface VoiceProperties extends BaseAIProperties {
|
|
261
|
+
audio_duration_ms?: number;
|
|
262
|
+
language?: string;
|
|
263
|
+
voice_type: 'input' | 'output';
|
|
264
|
+
[key: string]: any;
|
|
265
|
+
}
|
|
266
|
+
interface StreamingProperties extends BaseAIProperties {
|
|
267
|
+
chunk_count?: number;
|
|
268
|
+
chunks_per_second?: number;
|
|
269
|
+
first_chunk_latency_ms?: number;
|
|
270
|
+
stream_duration_ms?: number;
|
|
271
|
+
stream_type?: 'text' | 'audio' | 'video' | 'image';
|
|
272
|
+
time_to_first_chunk_ms?: number;
|
|
273
|
+
was_stopped?: boolean;
|
|
274
|
+
chunk_index?: number;
|
|
275
|
+
total_bytes?: number;
|
|
276
|
+
[key: string]: any;
|
|
277
|
+
}
|
|
278
|
+
interface CopyExportProperties extends BaseAIProperties {
|
|
279
|
+
action: 'copy-message' | 'copy-code' | 'export-conversation' | 'download-file';
|
|
280
|
+
content_length?: number;
|
|
281
|
+
export_format?: 'markdown' | 'json' | 'pdf' | 'txt';
|
|
282
|
+
}
|
|
283
|
+
interface ConversationManagementProperties extends BaseAIProperties {
|
|
284
|
+
action: 'save' | 'rename' | 'delete' | 'archive' | 'pin' | 'move' | 'duplicate';
|
|
285
|
+
new_folder_id?: string;
|
|
286
|
+
new_title?: string;
|
|
287
|
+
}
|
|
288
|
+
interface FolderProperties extends BaseAIProperties {
|
|
289
|
+
action: 'create' | 'rename' | 'delete' | 'move';
|
|
290
|
+
conversation_count?: number;
|
|
291
|
+
folder_id: string;
|
|
292
|
+
folder_name?: string;
|
|
293
|
+
parent_folder_id?: string;
|
|
294
|
+
}
|
|
295
|
+
interface SearchProperties extends BaseAIProperties {
|
|
296
|
+
query: string;
|
|
297
|
+
results_count?: number;
|
|
298
|
+
search_scope: 'conversations' | 'messages' | 'all';
|
|
299
|
+
search_time_ms?: number;
|
|
300
|
+
}
|
|
301
|
+
interface TemplateProperties extends BaseAIProperties {
|
|
302
|
+
action: 'create' | 'use' | 'edit' | 'delete';
|
|
303
|
+
category?: string;
|
|
304
|
+
template_id?: string;
|
|
305
|
+
template_name?: string;
|
|
306
|
+
}
|
|
307
|
+
interface ShareProperties extends BaseAIProperties {
|
|
308
|
+
expiration_time?: string;
|
|
309
|
+
share_id?: string;
|
|
310
|
+
share_scope: 'public' | 'team' | 'private-link';
|
|
311
|
+
share_type: 'conversation' | 'message' | 'artifact';
|
|
312
|
+
}
|
|
313
|
+
interface WorkspaceProperties extends BaseAIProperties {
|
|
314
|
+
action: 'create' | 'update' | 'delete' | 'invite';
|
|
315
|
+
member_count?: number;
|
|
316
|
+
workspace_name?: string;
|
|
317
|
+
}
|
|
318
|
+
interface TeamProperties extends BaseAIProperties {
|
|
319
|
+
action: 'invite' | 'remove' | 'update-role';
|
|
320
|
+
member_email?: string;
|
|
321
|
+
member_role?: 'admin' | 'member' | 'viewer';
|
|
322
|
+
team_id: string;
|
|
323
|
+
}
|
|
324
|
+
interface CommentProperties extends BaseAIProperties {
|
|
325
|
+
comment_id?: string;
|
|
326
|
+
comment_length?: number;
|
|
327
|
+
message_id: string;
|
|
328
|
+
parent_comment_id?: string;
|
|
329
|
+
}
|
|
330
|
+
interface ArtifactProperties extends BaseAIProperties {
|
|
331
|
+
action: 'create' | 'edit' | 'publish' | 'delete' | 'fork' | 'execute';
|
|
332
|
+
artifact_id?: string;
|
|
333
|
+
artifact_type: 'code' | 'document' | 'visualization' | 'react-component' | 'svg';
|
|
334
|
+
error_message?: string;
|
|
335
|
+
execution_status?: 'success' | 'failed' | 'pending' | 'error';
|
|
336
|
+
execution_time_ms?: number;
|
|
337
|
+
language?: string;
|
|
338
|
+
version?: number;
|
|
339
|
+
content_length?: number;
|
|
340
|
+
changes_description?: string;
|
|
341
|
+
new_artifact_id?: string;
|
|
342
|
+
[key: string]: any;
|
|
343
|
+
}
|
|
344
|
+
interface CanvasProperties extends BaseAIProperties {
|
|
345
|
+
action: 'open' | 'edit' | 'close' | 'save' | 'execute';
|
|
346
|
+
canvas_id?: string;
|
|
347
|
+
content_type?: 'code' | 'markdown' | 'mermaid' | 'html';
|
|
348
|
+
execution_result?: 'success' | 'error';
|
|
349
|
+
canvas_type?: string;
|
|
350
|
+
artifact_id?: string;
|
|
351
|
+
preview_enabled?: boolean;
|
|
352
|
+
[key: string]: any;
|
|
353
|
+
}
|
|
354
|
+
interface FeedbackProperties extends BaseAIProperties {
|
|
355
|
+
feedback_category?: 'accuracy' | 'helpfulness' | 'safety' | 'quality' | 'other';
|
|
356
|
+
feedback_text?: string;
|
|
357
|
+
feedback_type: 'thumbs-up' | 'thumbs-down' | 'rating' | 'detailed';
|
|
358
|
+
message_id: string;
|
|
359
|
+
rating?: number;
|
|
360
|
+
[key: string]: any;
|
|
361
|
+
}
|
|
362
|
+
interface IssueReportProperties extends BaseAIProperties {
|
|
363
|
+
issue_category: 'bug' | 'incorrect-output' | 'inappropriate-content' | 'other';
|
|
364
|
+
issue_description?: string;
|
|
365
|
+
message_id?: string;
|
|
366
|
+
severity?: 'low' | 'medium' | 'high';
|
|
367
|
+
[key: string]: any;
|
|
368
|
+
}
|
|
369
|
+
interface SafetyProperties extends BaseAIProperties {
|
|
370
|
+
action_taken?: 'blocked' | 'warned' | 'flagged';
|
|
371
|
+
category?: 'harmful' | 'inappropriate' | 'policy-violation';
|
|
372
|
+
message_id?: string;
|
|
373
|
+
safety_score?: number;
|
|
374
|
+
[key: string]: any;
|
|
375
|
+
}
|
|
376
|
+
interface RateLimitProperties extends BaseAIProperties {
|
|
377
|
+
limit_type: 'requests' | 'tokens' | 'cost';
|
|
378
|
+
reset_time_seconds?: number;
|
|
379
|
+
tier?: string;
|
|
380
|
+
[key: string]: any;
|
|
381
|
+
}
|
|
382
|
+
interface ErrorProperties extends BaseAIProperties {
|
|
383
|
+
error_code?: string;
|
|
384
|
+
error_message: string;
|
|
385
|
+
error_type: 'api' | 'timeout' | 'network' | 'validation' | 'content-filter' | 'rate-limit' | 'unknown';
|
|
386
|
+
operation: string;
|
|
387
|
+
retry_attempted?: boolean;
|
|
388
|
+
[key: string]: any;
|
|
389
|
+
}
|
|
390
|
+
interface LatencyProperties extends BaseAIProperties {
|
|
391
|
+
latency_ms: number;
|
|
392
|
+
latency_type: 'first-token' | 'total' | 'network' | 'processing';
|
|
393
|
+
operation: string;
|
|
394
|
+
[key: string]: any;
|
|
395
|
+
}
|
|
396
|
+
interface CostTrackingProperties extends BaseAIProperties, TokenUsageProperties {
|
|
397
|
+
cost_breakdown?: {
|
|
398
|
+
input_cost?: number;
|
|
399
|
+
output_cost?: number;
|
|
400
|
+
tool_cost?: number;
|
|
401
|
+
};
|
|
402
|
+
cost_per_request?: number;
|
|
403
|
+
pricing_tier?: string;
|
|
404
|
+
[key: string]: any;
|
|
405
|
+
}
|
|
406
|
+
interface CollaborationProperties extends BaseAIProperties {
|
|
407
|
+
member_id?: string;
|
|
408
|
+
member_role?: string;
|
|
409
|
+
permission_level?: string;
|
|
410
|
+
shared_with_count?: number;
|
|
411
|
+
share_type?: 'public' | 'team' | 'specific-users';
|
|
412
|
+
[key: string]: any;
|
|
413
|
+
}
|
|
414
|
+
interface FileProperties extends BaseAIProperties {
|
|
415
|
+
batch_size?: number;
|
|
416
|
+
extraction_method?: string;
|
|
417
|
+
file_count?: number;
|
|
418
|
+
file_id?: string;
|
|
419
|
+
file_name?: string;
|
|
420
|
+
file_size?: number;
|
|
421
|
+
file_type?: string;
|
|
422
|
+
processing_time_ms?: number;
|
|
423
|
+
file_size_bytes?: number;
|
|
424
|
+
total_size_bytes?: number;
|
|
425
|
+
extracted_text_length?: number;
|
|
426
|
+
processing_status?: string;
|
|
427
|
+
reference_context?: string;
|
|
428
|
+
[key: string]: any;
|
|
429
|
+
}
|
|
430
|
+
interface PerformanceProperties extends BaseAIProperties {
|
|
431
|
+
duration_ms?: number;
|
|
432
|
+
latency_ms?: number;
|
|
433
|
+
metric_name?: string;
|
|
434
|
+
metric_value?: number;
|
|
435
|
+
[key: string]: any;
|
|
436
|
+
}
|
|
437
|
+
interface SystemProperties extends BaseAIProperties {
|
|
438
|
+
error_code?: string;
|
|
439
|
+
error_message?: string;
|
|
440
|
+
setting_name?: string;
|
|
441
|
+
setting_value?: string;
|
|
442
|
+
system_event?: string;
|
|
443
|
+
[key: string]: any;
|
|
444
|
+
}
|
|
445
|
+
interface ToolProperties extends BaseAIProperties {
|
|
446
|
+
execution_time_ms?: number;
|
|
447
|
+
input_data?: Record<string, any>;
|
|
448
|
+
output_data?: Record<string, any>;
|
|
449
|
+
tool_id?: string;
|
|
450
|
+
tool_name?: string;
|
|
451
|
+
[key: string]: any;
|
|
452
|
+
}
|
|
453
|
+
interface UserInteractionProperties extends BaseAIProperties {
|
|
454
|
+
action?: string;
|
|
455
|
+
content_length?: number;
|
|
456
|
+
content_type?: string;
|
|
457
|
+
interaction_type?: string;
|
|
458
|
+
target_id?: string;
|
|
459
|
+
content_id?: string;
|
|
460
|
+
suggestion_type?: string;
|
|
461
|
+
[key: string]: any;
|
|
462
|
+
}
|
|
463
|
+
declare const AI_EVENTS: {
|
|
464
|
+
readonly BRANCH_CREATED: "AI Branch Created";
|
|
465
|
+
readonly BRANCH_MERGED: "AI Branch Merged";
|
|
466
|
+
readonly CONVERSATION_CONTINUED: "AI Conversation Continued";
|
|
467
|
+
readonly CONVERSATION_DELETED: "AI Conversation Deleted";
|
|
468
|
+
readonly CONVERSATION_ENDED: "AI Conversation Ended";
|
|
469
|
+
readonly CONVERSATION_RESUMED: "AI Conversation Resumed";
|
|
470
|
+
readonly CONVERSATION_STARTED: "AI Conversation Started";
|
|
471
|
+
readonly MESSAGE_DELETED: "AI Message Deleted";
|
|
472
|
+
readonly MESSAGE_EDITED: "AI Message Edited";
|
|
473
|
+
readonly MESSAGE_RECEIVED: "AI Message Received";
|
|
474
|
+
readonly MESSAGE_REGENERATED: "AI Message Regenerated";
|
|
475
|
+
readonly MESSAGE_SENT: "AI Message Sent";
|
|
476
|
+
readonly STOP_GENERATION: "AI Stop Generation";
|
|
477
|
+
readonly STREAMING_CHUNK_RECEIVED: "AI Streaming Chunk Received";
|
|
478
|
+
readonly CODE_DEBUGGED: "AI Code Debugged";
|
|
479
|
+
readonly CODE_EDITED: "AI Code Edited";
|
|
480
|
+
readonly CODE_EXECUTED: "AI Code Executed";
|
|
481
|
+
readonly CODE_EXPLAINED: "AI Code Explained";
|
|
482
|
+
readonly CODE_GENERATED: "AI Code Generated";
|
|
483
|
+
readonly CODE_REFACTORED: "AI Code Refactored";
|
|
484
|
+
readonly CODE_TRANSLATED: "AI Code Translated";
|
|
485
|
+
readonly COMPLETION_GENERATED: "AI Completion Generated";
|
|
486
|
+
readonly CONTENT_COPIED: "AI Content Copied";
|
|
487
|
+
readonly CONTENT_DOWNLOADED: "AI Content Downloaded";
|
|
488
|
+
readonly CONTENT_REWRITTEN: "AI Content Rewritten";
|
|
489
|
+
readonly CONTENT_SHARED: "AI Content Shared";
|
|
490
|
+
readonly DIFF_VIEWED: "AI Diff Viewed";
|
|
491
|
+
readonly DOCUMENT_CREATED: "AI Document Created";
|
|
492
|
+
readonly EMAIL_DRAFTED: "AI Email Drafted";
|
|
493
|
+
readonly IMAGE_EDITED: "AI Image Edited";
|
|
494
|
+
readonly IMAGE_GENERATED: "AI Image Generated";
|
|
495
|
+
readonly IMAGE_REVISED: "AI Image Revised";
|
|
496
|
+
readonly INLINE_EDIT_APPLIED: "AI Inline Edit Applied";
|
|
497
|
+
readonly OUTLINE_CREATED: "AI Outline Created";
|
|
498
|
+
readonly REWRITE_GENERATED: "AI Rewrite Generated";
|
|
499
|
+
readonly SUGGESTION_ACCEPTED: "AI Suggestion Accepted";
|
|
500
|
+
readonly SUGGESTION_REJECTED: "AI Suggestion Rejected";
|
|
501
|
+
readonly SUMMARY_GENERATED: "AI Summary Generated";
|
|
502
|
+
readonly TEXT_GENERATED: "AI Text Generated";
|
|
503
|
+
readonly TEXT_TRANSLATED: "AI Text Translated";
|
|
504
|
+
readonly TRANSLATION_GENERATED: "AI Translation Generated";
|
|
505
|
+
readonly BATCH_FILES_PROCESSED: "AI Batch Files Processed";
|
|
506
|
+
readonly FILE_ANALYZED: "AI File Analyzed";
|
|
507
|
+
readonly FILE_DELETED: "AI File Deleted";
|
|
508
|
+
readonly FILE_DOWNLOADED: "AI File Downloaded";
|
|
509
|
+
readonly FILE_PROCESSED: "AI File Processed";
|
|
510
|
+
readonly FILE_PROCESSING_FAILED: "AI File Processing Failed";
|
|
511
|
+
readonly FILE_REFERENCED: "AI File Referenced";
|
|
512
|
+
readonly FILE_UPLOADED: "AI File Uploaded";
|
|
513
|
+
readonly IMAGE_ANALYZED: "AI Image Analyzed";
|
|
514
|
+
readonly IMAGE_UPLOADED: "AI Image Uploaded";
|
|
515
|
+
readonly BROWSE_SESSION_STARTED: "AI Browse Session Started";
|
|
516
|
+
readonly CITATION_ADDED: "AI Citation Added";
|
|
517
|
+
readonly CITATION_PROVIDED: "AI Citation Provided";
|
|
518
|
+
readonly EXTERNAL_SOURCE_ACCESSED: "AI External Source Accessed";
|
|
519
|
+
readonly PAGE_CONTENT_FETCHED: "AI Page Content Fetched";
|
|
520
|
+
readonly SEARCH_RESULTS_RANKED: "AI Search Results Ranked";
|
|
521
|
+
readonly WEB_BROWSED: "AI Web Browsed";
|
|
522
|
+
readonly WEB_SEARCH_PERFORMED: "AI Web Search Performed";
|
|
523
|
+
readonly WEB_SEARCHED: "AI Web Searched";
|
|
524
|
+
readonly API_CALLED: "AI API Called";
|
|
525
|
+
readonly API_REQUEST_MADE: "AI API Request Made";
|
|
526
|
+
readonly EXTENSION_USED: "AI Extension Used";
|
|
527
|
+
readonly FUNCTION_EXECUTED: "AI Function Executed";
|
|
528
|
+
readonly PLUGIN_ACTIVATED: "AI Plugin Activated";
|
|
529
|
+
readonly PLUGIN_DISABLED: "AI Plugin Disabled";
|
|
530
|
+
readonly PLUGIN_ENABLED: "AI Plugin Enabled";
|
|
531
|
+
readonly PLUGIN_USED: "AI Plugin Used";
|
|
532
|
+
readonly TOOL_CALL_COMPLETED: "AI Tool Call Completed";
|
|
533
|
+
readonly TOOL_CALL_FAILED: "AI Tool Call Failed";
|
|
534
|
+
readonly TOOL_CALL_STARTED: "AI Tool Call Started";
|
|
535
|
+
readonly TOOL_CALLED: "AI Tool Called";
|
|
536
|
+
readonly TOOL_FAILED: "AI Tool Failed";
|
|
537
|
+
readonly CONTEXT_CLEARED: "AI Context Cleared";
|
|
538
|
+
readonly CONTEXT_PRUNED: "AI Context Pruned";
|
|
539
|
+
readonly CONTEXT_UPDATED: "AI Context Updated";
|
|
540
|
+
readonly CONTEXT_WINDOW_UPDATED: "AI Context Window Updated";
|
|
541
|
+
readonly CUSTOM_INSTRUCTIONS_CLEARED: "AI Custom Instructions Cleared";
|
|
542
|
+
readonly CUSTOM_INSTRUCTIONS_CREATED: "AI Custom Instructions Created";
|
|
543
|
+
readonly CUSTOM_INSTRUCTIONS_UPDATED: "AI Custom Instructions Updated";
|
|
544
|
+
readonly EMBEDDING_GENERATED: "AI Embedding Generated";
|
|
545
|
+
readonly KNOWLEDGE_BASE_QUERIED: "AI Knowledge Base Queried";
|
|
546
|
+
readonly MEMORY_CLEARED: "AI Memory Cleared";
|
|
547
|
+
readonly MEMORY_CREATED: "AI Memory Created";
|
|
548
|
+
readonly MEMORY_DELETED: "AI Memory Deleted";
|
|
549
|
+
readonly MEMORY_RECALLED: "AI Memory Recalled";
|
|
550
|
+
readonly MEMORY_RETRIEVED: "AI Memory Retrieved";
|
|
551
|
+
readonly MEMORY_STORED: "AI Memory Stored";
|
|
552
|
+
readonly MEMORY_UPDATED: "AI Memory Updated";
|
|
553
|
+
readonly PROJECT_CONTEXT_LOADED: "AI Project Context Loaded";
|
|
554
|
+
readonly RAG_QUERY_EXECUTED: "AI RAG Query Executed";
|
|
555
|
+
readonly AUDIO_INPUT_USED: "AI Audio Input Used";
|
|
556
|
+
readonly AUDIO_OUTPUT_USED: "AI Audio Output Used";
|
|
557
|
+
readonly CODE_COPIED: "AI Code Copied";
|
|
558
|
+
readonly CONVERSATION_EXPORTED: "AI Conversation Exported";
|
|
559
|
+
readonly MESSAGE_COPIED: "AI Message Copied";
|
|
560
|
+
readonly MODEL_SELECTED: "AI Model Selected";
|
|
561
|
+
readonly PARAMETER_ADJUSTED: "AI Parameter Adjusted";
|
|
562
|
+
readonly STREAM_COMPLETED: "AI Stream Completed";
|
|
563
|
+
readonly STREAM_STARTED: "AI Stream Started";
|
|
564
|
+
readonly STREAMING_COMPLETED: "AI Streaming Completed";
|
|
565
|
+
readonly STREAMING_STARTED: "AI Streaming Started";
|
|
566
|
+
readonly CONVERSATION_ARCHIVED: "AI Conversation Archived";
|
|
567
|
+
readonly CONVERSATION_DUPLICATED: "AI Conversation Duplicated";
|
|
568
|
+
readonly CONVERSATION_MOVED: "AI Conversation Moved";
|
|
569
|
+
readonly CONVERSATION_PINNED: "AI Conversation Pinned";
|
|
570
|
+
readonly CONVERSATION_RENAMED: "AI Conversation Renamed";
|
|
571
|
+
readonly CONVERSATION_SAVED: "AI Conversation Saved";
|
|
572
|
+
readonly CONVERSATION_SEARCHED: "AI Conversation Searched";
|
|
573
|
+
readonly FILTER_APPLIED: "AI Filter Applied";
|
|
574
|
+
readonly FOLDER_CREATED: "AI Folder Created";
|
|
575
|
+
readonly FOLDER_DELETED: "AI Folder Deleted";
|
|
576
|
+
readonly FOLDER_RENAMED: "AI Folder Renamed";
|
|
577
|
+
readonly SEARCH_PERFORMED: "AI Search Performed";
|
|
578
|
+
readonly TAG_ADDED: "AI Tag Added";
|
|
579
|
+
readonly TEMPLATE_CREATED: "AI Template Created";
|
|
580
|
+
readonly TEMPLATE_DELETED: "AI Template Deleted";
|
|
581
|
+
readonly TEMPLATE_USED: "AI Template Used";
|
|
582
|
+
readonly COMMENT_ADDED: "AI Comment Added";
|
|
583
|
+
readonly CONVERSATION_FORKED: "AI Conversation Forked";
|
|
584
|
+
readonly CONVERSATION_SHARED: "AI Conversation Shared";
|
|
585
|
+
readonly MEMBER_INVITED: "AI Member Invited";
|
|
586
|
+
readonly PERMISSION_CHANGED: "AI Permission Changed";
|
|
587
|
+
readonly TEAM_MEMBER_INVITED: "AI Team Member Invited";
|
|
588
|
+
readonly TEAM_MEMBER_REMOVED: "AI Team Member Removed";
|
|
589
|
+
readonly WORKSPACE_CREATED: "AI Workspace Created";
|
|
590
|
+
readonly ARTIFACT_CREATED: "AI Artifact Created";
|
|
591
|
+
readonly ARTIFACT_EDITED: "AI Artifact Edited";
|
|
592
|
+
readonly ARTIFACT_EXECUTED: "AI Artifact Executed";
|
|
593
|
+
readonly ARTIFACT_FORKED: "AI Artifact Forked";
|
|
594
|
+
readonly ARTIFACT_PUBLISHED: "AI Artifact Published";
|
|
595
|
+
readonly CANVAS_CLOSED: "AI Canvas Closed";
|
|
596
|
+
readonly CANVAS_EDITED: "AI Canvas Edited";
|
|
597
|
+
readonly CANVAS_OPENED: "AI Canvas Opened";
|
|
598
|
+
readonly CANVAS_SAVED: "AI Canvas Saved";
|
|
599
|
+
readonly LIVE_PREVIEW_TOGGLED: "AI Live Preview Toggled";
|
|
600
|
+
readonly BUG_REPORTED: "AI Bug Reported";
|
|
601
|
+
readonly FEATURE_REQUESTED: "AI Feature Requested";
|
|
602
|
+
readonly FEEDBACK_NEGATIVE: "AI Feedback Negative";
|
|
603
|
+
readonly FEEDBACK_POSITIVE: "AI Feedback Positive";
|
|
604
|
+
readonly FEEDBACK_PROVIDED: "AI Feedback Provided";
|
|
605
|
+
readonly HARMFUL_CONTENT_FLAGGED: "AI Harmful Content Flagged";
|
|
606
|
+
readonly ISSUE_REPORTED: "AI Issue Reported";
|
|
607
|
+
readonly QUALITY_ISSUE_REPORTED: "AI Quality Issue Reported";
|
|
608
|
+
readonly RATING_PROVIDED: "AI Rating Provided";
|
|
609
|
+
readonly RESPONSE_RATED: "AI Response Rated";
|
|
610
|
+
readonly SAFETY_VIOLATION: "AI Safety Violation";
|
|
611
|
+
readonly COST_TRACKED: "AI Cost Tracked";
|
|
612
|
+
readonly ERROR_OCCURRED: "AI Error Occurred";
|
|
613
|
+
readonly LATENCY_MEASURED: "AI Latency Measured";
|
|
614
|
+
readonly MODEL_SWITCHED: "AI Model Switched";
|
|
615
|
+
readonly PERFORMANCE_MEASURED: "AI Performance Measured";
|
|
616
|
+
readonly RATE_LIMIT_HIT: "AI Rate Limit Hit";
|
|
617
|
+
readonly SETTINGS_UPDATED: "AI Settings Updated";
|
|
618
|
+
readonly TOKEN_LIMIT_REACHED: "AI Token Limit Reached";
|
|
619
|
+
readonly TOKEN_USAGE_TRACKED: "AI Token Usage Tracked";
|
|
620
|
+
};
|
|
621
|
+
type AIEventName = (typeof AI_EVENTS)[keyof typeof AI_EVENTS];
|
|
622
|
+
type AIEventCategory = 'ai' | 'conversation' | 'content' | 'artifacts' | 'tool' | 'feedback' | 'system' | 'workspace' | 'content-generation' | 'user-interactions' | 'files' | 'context' | 'collaboration';
|
|
623
|
+
interface AIEventSpec<T = any> {
|
|
624
|
+
category: AIEventCategory;
|
|
625
|
+
name: AIEventName;
|
|
626
|
+
properties: T;
|
|
627
|
+
requiredProperties: (keyof T)[];
|
|
628
|
+
}
|
|
629
|
+
type AIEventProperties = BaseAIProperties | ConversationProperties | MessageProperties | RegenerationProperties | MessageEditProperties | BranchProperties | TextGenerationProperties | CodeGenerationProperties | ImageGenerationProperties | SummaryProperties | TranslationProperties | FileUploadProperties | FileAnalysisProperties | ImageAnalysisProperties | WebSearchProperties | WebBrowseProperties | CitationProperties | ToolCallProperties | PluginProperties | APICallProperties | ContextProperties | MemoryProperties | CustomInstructionsProperties | ModelSelectionProperties | ParameterAdjustmentProperties | VoiceProperties | StreamingProperties | CopyExportProperties | ConversationManagementProperties | FolderProperties | SearchProperties | TemplateProperties | ShareProperties | WorkspaceProperties | TeamProperties | CommentProperties | ArtifactProperties | CanvasProperties | FeedbackProperties | IssueReportProperties | SafetyProperties | RateLimitProperties | ErrorProperties | LatencyProperties | CostTrackingProperties;
|
|
630
|
+
declare const AI_SDK_EVENTS: {
|
|
631
|
+
readonly AGENT_CREATED: "ai_sdk_agent_created";
|
|
632
|
+
readonly AGENT_EXECUTION_STARTED: "ai_sdk_agent_execution_started";
|
|
633
|
+
readonly AGENT_EXECUTION_COMPLETED: "ai_sdk_agent_execution_completed";
|
|
634
|
+
readonly AGENT_EXECUTION_FAILED: "ai_sdk_agent_execution_failed";
|
|
635
|
+
readonly COMPLETION_REQUESTED: "ai_sdk_completion_requested";
|
|
636
|
+
readonly COMPLETION_GENERATED: "ai_sdk_completion_generated";
|
|
637
|
+
readonly COMPLETION_FAILED: "ai_sdk_completion_failed";
|
|
638
|
+
readonly TOOL_CALL_STARTED: "ai_sdk_tool_call_started";
|
|
639
|
+
readonly TOOL_CALL_COMPLETED: "ai_sdk_tool_call_completed";
|
|
640
|
+
readonly TOOL_CALL_FAILED: "ai_sdk_tool_call_failed";
|
|
641
|
+
readonly STREAM_STARTED: "ai_sdk_stream_started";
|
|
642
|
+
readonly STREAM_CHUNK_RECEIVED: "ai_sdk_stream_chunk_received";
|
|
643
|
+
readonly STREAM_COMPLETED: "ai_sdk_stream_completed";
|
|
644
|
+
readonly STREAM_FAILED: "ai_sdk_stream_failed";
|
|
645
|
+
readonly CHAT_SESSION_STARTED: "ai_sdk_chat_session_started";
|
|
646
|
+
readonly CHAT_SESSION_ENDED: "ai_sdk_chat_session_ended";
|
|
647
|
+
readonly CHAT_MESSAGE_SENT: "ai_sdk_chat_message_sent";
|
|
648
|
+
readonly CHAT_MESSAGE_RECEIVED: "ai_sdk_chat_message_received";
|
|
649
|
+
readonly CHATBOT_INTENT_DETECTED: "ai_sdk_chatbot_intent_detected";
|
|
650
|
+
readonly CHATBOT_CART_ASSISTED: "ai_sdk_chatbot_cart_assisted";
|
|
651
|
+
readonly CHATBOT_ORDER_ASSISTED: "ai_sdk_chatbot_order_assisted";
|
|
652
|
+
readonly CHATBOT_PRODUCT_RECOMMENDED: "ai_sdk_chatbot_product_recommended";
|
|
653
|
+
readonly TOKEN_USAGE_TRACKED: "ai_sdk_token_usage_tracked";
|
|
654
|
+
readonly MULTI_STEP_STARTED: "ai_sdk_multi_step_started";
|
|
655
|
+
readonly MULTI_STEP_PROGRESSED: "ai_sdk_multi_step_progressed";
|
|
656
|
+
readonly MULTI_STEP_COMPLETED: "ai_sdk_multi_step_completed";
|
|
657
|
+
};
|
|
658
|
+
interface BaseAISDKProperties {
|
|
659
|
+
model_id: string;
|
|
660
|
+
model_provider?: 'anthropic' | 'openai' | 'google' | 'cohere' | 'mistral' | 'other' | 'perplexity' | undefined;
|
|
661
|
+
session_id?: string | undefined;
|
|
662
|
+
user_id?: string | undefined;
|
|
663
|
+
operation_id?: string | undefined;
|
|
664
|
+
conversation_id?: string | undefined;
|
|
665
|
+
message_id?: string | undefined;
|
|
666
|
+
timestamp?: number | undefined;
|
|
667
|
+
}
|
|
668
|
+
interface AgentProperties extends BaseAISDKProperties, TokenUsageProperties {
|
|
669
|
+
agent_id?: string;
|
|
670
|
+
agent_name?: string;
|
|
671
|
+
agent_type?: string;
|
|
672
|
+
agent_version?: string;
|
|
673
|
+
system_prompt_length?: number;
|
|
674
|
+
tools_available?: string[];
|
|
675
|
+
tools_count?: number;
|
|
676
|
+
execution_time_ms?: number;
|
|
677
|
+
iterations?: number;
|
|
678
|
+
completion_type?: string;
|
|
679
|
+
status?: 'success' | 'failed' | 'pending';
|
|
680
|
+
total_duration_ms?: number;
|
|
681
|
+
step_count?: number;
|
|
682
|
+
retry_count?: number;
|
|
683
|
+
has_tools?: boolean;
|
|
684
|
+
}
|
|
685
|
+
interface CompletionProperties extends BaseAISDKProperties, TokenUsageProperties, ModelConfigProperties {
|
|
686
|
+
prompt_length?: number;
|
|
687
|
+
completion_length?: number;
|
|
688
|
+
finish_reason?: 'stop' | 'length' | 'content_filter' | 'tool_calls';
|
|
689
|
+
generation_time_ms?: number;
|
|
690
|
+
stream?: boolean;
|
|
691
|
+
completion_type?: string;
|
|
692
|
+
status?: 'success' | 'failed' | 'pending' | 'completed';
|
|
693
|
+
total_duration_ms?: number;
|
|
694
|
+
step_count?: number;
|
|
695
|
+
retry_count?: number;
|
|
696
|
+
has_tools?: boolean;
|
|
697
|
+
agent_id?: string;
|
|
698
|
+
conversation_id?: string;
|
|
699
|
+
}
|
|
700
|
+
interface ToolCallSDKProperties extends BaseAISDKProperties {
|
|
701
|
+
tool_name: string;
|
|
702
|
+
tool_id?: string;
|
|
703
|
+
tool_call_id?: string;
|
|
704
|
+
tool_type?: string;
|
|
705
|
+
input_schema?: Record<string, any>;
|
|
706
|
+
input_size?: number;
|
|
707
|
+
output_schema?: Record<string, any>;
|
|
708
|
+
output_size?: number;
|
|
709
|
+
execution_time_ms?: number;
|
|
710
|
+
success?: boolean;
|
|
711
|
+
result_status?: 'success' | 'error' | 'partial';
|
|
712
|
+
}
|
|
713
|
+
interface StreamingSDKProperties extends BaseAISDKProperties {
|
|
714
|
+
chunk_index?: number | undefined;
|
|
715
|
+
chunks_total?: number | undefined;
|
|
716
|
+
chunk_count?: number | undefined;
|
|
717
|
+
bytes_streamed?: number | undefined;
|
|
718
|
+
stream_duration_ms?: number | undefined;
|
|
719
|
+
first_chunk_time_ms?: number | undefined;
|
|
720
|
+
stream_type?: 'text' | 'audio' | 'video' | 'image' | undefined;
|
|
721
|
+
time_to_first_chunk_ms?: number | undefined;
|
|
722
|
+
chunks_per_second?: number | undefined;
|
|
723
|
+
was_stopped?: boolean | undefined;
|
|
724
|
+
}
|
|
725
|
+
interface SessionProperties extends BaseAISDKProperties, TokenUsageProperties {
|
|
726
|
+
session_id: string;
|
|
727
|
+
session_type?: 'chat' | 'completion' | 'streaming';
|
|
728
|
+
duration_ms?: number;
|
|
729
|
+
message_count?: number;
|
|
730
|
+
tool_calls_count?: number;
|
|
731
|
+
session_end_reason?: 'user-ended' | 'timeout' | 'error' | 'completed';
|
|
732
|
+
}
|
|
733
|
+
interface ChatMessageProperties extends BaseAISDKProperties, TokenUsageProperties {
|
|
734
|
+
chat_id?: string;
|
|
735
|
+
conversation_id?: string;
|
|
736
|
+
message_id?: string;
|
|
737
|
+
message_role: 'user' | 'assistant' | 'system' | 'tool';
|
|
738
|
+
message_length?: number;
|
|
739
|
+
has_attachments?: boolean;
|
|
740
|
+
response_time_ms?: number;
|
|
741
|
+
message_index?: number;
|
|
742
|
+
has_images?: boolean;
|
|
743
|
+
parent_message_id?: string;
|
|
744
|
+
finish_reason?: string;
|
|
745
|
+
is_streaming?: boolean;
|
|
746
|
+
}
|
|
747
|
+
interface ChatbotEcommerceProperties extends BaseAISDKProperties {
|
|
748
|
+
conversation_id?: string;
|
|
749
|
+
intent?: string;
|
|
750
|
+
confidence?: number;
|
|
751
|
+
product_ids?: string[];
|
|
752
|
+
product_count?: number;
|
|
753
|
+
cart_value?: number;
|
|
754
|
+
order_id?: string;
|
|
755
|
+
recommendation_type?: string;
|
|
756
|
+
intent_detected?: string;
|
|
757
|
+
cart_id?: string;
|
|
758
|
+
}
|
|
759
|
+
//#endregion
|
|
760
|
+
//#region src/shared/emitters/ai/utils.d.ts
|
|
761
|
+
declare function cleanProperties<T extends Record<string, any>>(props: T): Partial<T>;
|
|
762
|
+
declare function validateRequiredProperties<T extends Record<string, any>>(properties: T, required: (keyof T)[]): void;
|
|
763
|
+
declare function normalizeBaseProperties(props: BaseAIProperties): BaseAIProperties;
|
|
764
|
+
declare function normalizeTokenUsage(props: TokenUsageProperties): TokenUsageProperties;
|
|
765
|
+
declare function normalizeModelConfig(props: ModelConfigProperties): ModelConfigProperties;
|
|
766
|
+
declare function calculateCost(usage: TokenUsageProperties, pricing: {
|
|
767
|
+
input_price_per_1k?: number;
|
|
768
|
+
output_price_per_1k?: number;
|
|
769
|
+
}): number;
|
|
770
|
+
declare function extractModelProvider(modelId: string): 'anthropic' | 'openai' | 'google' | 'perplexity' | 'other';
|
|
771
|
+
declare function generateOperationId(prefix?: string): string;
|
|
772
|
+
declare function sanitizeErrorMessage(error: Error | string): string;
|
|
773
|
+
declare function calculateCompletionMetrics(startTime: number, endTime: number, tokenUsage?: TokenUsageProperties): {
|
|
774
|
+
duration_ms: number;
|
|
775
|
+
tokens_per_second?: number;
|
|
776
|
+
};
|
|
777
|
+
declare function detectIntent(message: string): 'product-search' | 'product-inquiry' | 'product-comparison' | 'cart-management' | 'checkout-help' | 'order-tracking' | 'returns-exchanges' | 'support-question' | 'general-inquiry' | 'complaint' | 'feedback';
|
|
778
|
+
declare function detectSentiment(message: string): 'positive' | 'negative' | 'neutral' | 'mixed';
|
|
779
|
+
declare function truncateArray<T>(arr: T[], maxLength?: number): T[];
|
|
780
|
+
declare function safeStringify(obj?: unknown, maxLength?: number): string;
|
|
781
|
+
declare function calculateQualityScore(metrics: {
|
|
782
|
+
message_count: number;
|
|
783
|
+
avg_response_time_ms?: number;
|
|
784
|
+
misunderstanding_count?: number;
|
|
785
|
+
clarification_count?: number;
|
|
786
|
+
satisfaction_score?: number;
|
|
787
|
+
}): number;
|
|
788
|
+
declare function needsClarification(message: string): boolean;
|
|
789
|
+
declare function extractProductMentions(message: string): string[];
|
|
790
|
+
declare const detectChatbotIntent: typeof detectIntent;
|
|
791
|
+
//#endregion
|
|
792
|
+
//#region src/shared/emitters/ai/track-ai.d.ts
|
|
793
|
+
declare function trackAI(eventSpec: AIEventSpec, options?: EmitterOptions): EmitterTrackPayload;
|
|
794
|
+
declare function createAITracker<T extends Record<string, any>>(eventFactory: (properties: T) => AIEventSpec): (properties: T, options?: EmitterOptions) => EmitterTrackPayload;
|
|
795
|
+
//#endregion
|
|
796
|
+
//#region src/shared/emitters/ai/events/conversation.d.ts
|
|
797
|
+
declare const CONVERSATION_STARTED: (properties: ConversationProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
798
|
+
declare const CONVERSATION_RESUMED: (properties: ConversationProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
799
|
+
declare const CONVERSATION_ENDED: (properties: ConversationProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
800
|
+
declare const MESSAGE_SENT: (properties: MessageProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
801
|
+
declare const MESSAGE_RECEIVED: (properties: MessageProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
802
|
+
declare const MESSAGE_REGENERATED: (properties: RegenerationProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
803
|
+
declare const MESSAGE_EDITED: (properties: MessageProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
804
|
+
declare const MESSAGE_DELETED: (properties: MessageProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
805
|
+
declare const BRANCH_CREATED: (properties: BranchProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
806
|
+
declare const BRANCH_MERGED: (properties: BranchProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
807
|
+
declare const STOP_GENERATION: (properties: StopGenerationProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
808
|
+
declare const STREAMING_STARTED: (properties: StreamingSDKProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
809
|
+
declare const STREAMING_CHUNK_RECEIVED: (properties: StreamingSDKProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
810
|
+
declare const STREAMING_COMPLETED: (properties: StreamingSDKProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
811
|
+
//#endregion
|
|
812
|
+
//#region src/shared/emitters/ai/events/content-generation.d.ts
|
|
813
|
+
declare const CODE_GENERATED: (properties: CodeGenerationProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
814
|
+
declare const CODE_EXPLAINED: (properties: CodeGenerationProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
815
|
+
declare const CODE_DEBUGGED: (properties: CodeGenerationProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
816
|
+
declare const CODE_REFACTORED: (properties: CodeGenerationProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
817
|
+
declare const CODE_TRANSLATED: (properties: CodeGenerationProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
818
|
+
declare const IMAGE_GENERATED: (properties: ImageGenerationProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
819
|
+
declare const IMAGE_EDITED: (properties: ImageGenerationProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
820
|
+
declare const TEXT_GENERATED: (properties: ContentGenerationProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
821
|
+
declare const SUMMARY_GENERATED: (properties: SummaryProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
822
|
+
declare const TRANSLATION_GENERATED: (properties: ContentGenerationProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
823
|
+
declare const COMPLETION_GENERATED: (properties: ContentGenerationProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
824
|
+
declare const REWRITE_GENERATED: (properties: ContentGenerationProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
825
|
+
declare const EMAIL_DRAFTED: (properties: ContentGenerationProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
826
|
+
declare const DOCUMENT_CREATED: (properties: ContentGenerationProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
827
|
+
declare const OUTLINE_CREATED: (properties: ContentGenerationProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
828
|
+
//#endregion
|
|
829
|
+
//#region src/shared/emitters/ai/events/artifacts.d.ts
|
|
830
|
+
declare const ARTIFACT_CREATED: (properties: ArtifactProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
831
|
+
declare const ARTIFACT_EDITED: (properties: ArtifactProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
832
|
+
declare const ARTIFACT_EXECUTED: (properties: ArtifactProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
833
|
+
declare const ARTIFACT_PUBLISHED: (properties: ArtifactProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
834
|
+
declare const ARTIFACT_FORKED: (properties: ArtifactProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
835
|
+
declare const CANVAS_OPENED: (properties: CanvasProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
836
|
+
declare const LIVE_PREVIEW_TOGGLED: (properties: CanvasProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
837
|
+
//#endregion
|
|
838
|
+
//#region src/shared/emitters/ai/events/product-features.d.ts
|
|
839
|
+
declare const CODE_COPIED: (properties: CodeGenerationProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
840
|
+
declare const CODE_EXECUTED: (properties: CodeGenerationProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
841
|
+
declare const CONTENT_COPIED: (properties: UserInteractionProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
842
|
+
declare const CONTENT_DOWNLOADED: (properties: UserInteractionProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
843
|
+
declare const CONTENT_SHARED: (properties: UserInteractionProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
844
|
+
declare const SUGGESTION_ACCEPTED: (properties: UserInteractionProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
845
|
+
declare const SUGGESTION_REJECTED: (properties: UserInteractionProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
846
|
+
declare const INLINE_EDIT_APPLIED: (properties: UserInteractionProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
847
|
+
declare const DIFF_VIEWED: (properties: UserInteractionProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
848
|
+
declare const FILE_UPLOADED: (properties: FileProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
849
|
+
declare const FILE_PROCESSED: (properties: FileProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
850
|
+
declare const FILE_PROCESSING_FAILED: (properties: FileProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
851
|
+
declare const FILE_DOWNLOADED: (properties: FileProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
852
|
+
declare const FILE_REFERENCED: (properties: FileProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
853
|
+
declare const FILE_DELETED: (properties: FileProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
854
|
+
declare const BATCH_FILES_PROCESSED: (properties: FileProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
855
|
+
declare const CONTEXT_WINDOW_UPDATED: (properties: ContextProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
856
|
+
declare const MEMORY_CREATED: (properties: MemoryProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
857
|
+
declare const MEMORY_RETRIEVED: (properties: MemoryProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
858
|
+
declare const MEMORY_UPDATED: (properties: MemoryProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
859
|
+
declare const MEMORY_DELETED: (properties: MemoryProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
860
|
+
declare const CUSTOM_INSTRUCTIONS_UPDATED: (properties: ContextProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
861
|
+
declare const PROJECT_CONTEXT_LOADED: (properties: ContextProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
862
|
+
declare const RAG_QUERY_EXECUTED: (properties: ContextProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
863
|
+
declare const EMBEDDING_GENERATED: (properties: ContextProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
864
|
+
declare const KNOWLEDGE_BASE_QUERIED: (properties: ContextProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
865
|
+
declare const CONVERSATION_SHARED: (properties: CollaborationProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
866
|
+
declare const CONVERSATION_FORKED: (properties: CollaborationProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
867
|
+
declare const WORKSPACE_CREATED: (properties: WorkspaceProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
868
|
+
declare const MEMBER_INVITED: (properties: CollaborationProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
869
|
+
declare const COMMENT_ADDED: (properties: CollaborationProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
870
|
+
declare const PERMISSION_CHANGED: (properties: CollaborationProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
871
|
+
declare const CONVERSATION_RENAMED: (properties: WorkspaceProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
872
|
+
declare const CONVERSATION_ARCHIVED: (properties: WorkspaceProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
873
|
+
declare const CONVERSATION_DELETED: (properties: WorkspaceProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
874
|
+
declare const FOLDER_CREATED: (properties: WorkspaceProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
875
|
+
declare const TAG_ADDED: (properties: WorkspaceProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
876
|
+
declare const SEARCH_PERFORMED: (properties: WorkspaceProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
877
|
+
declare const FILTER_APPLIED: (properties: WorkspaceProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
878
|
+
declare const FEEDBACK_PROVIDED: (properties: FeedbackProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
879
|
+
declare const RESPONSE_RATED: (properties: FeedbackProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
880
|
+
declare const BUG_REPORTED: (properties: FeedbackProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
881
|
+
declare const FEATURE_REQUESTED: (properties: FeedbackProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
882
|
+
declare const HARMFUL_CONTENT_FLAGGED: (properties: FeedbackProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
883
|
+
declare const QUALITY_ISSUE_REPORTED: (properties: FeedbackProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
884
|
+
declare const MODEL_SWITCHED: (properties: SystemProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
885
|
+
declare const SETTINGS_UPDATED: (properties: SystemProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
886
|
+
declare const ERROR_OCCURRED: (properties: SystemProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
887
|
+
declare const RATE_LIMIT_HIT: (properties: SystemProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
888
|
+
declare const TOKEN_USAGE_TRACKED: (properties: BaseAIProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
889
|
+
declare const PERFORMANCE_MEASURED: (properties: PerformanceProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
890
|
+
declare const TOOL_CALL_STARTED: (properties: ToolProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
891
|
+
declare const TOOL_CALL_COMPLETED: (properties: ToolProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
892
|
+
declare const TOOL_CALL_FAILED: (properties: ToolProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
893
|
+
declare const FUNCTION_EXECUTED: (properties: ToolProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
894
|
+
declare const API_REQUEST_MADE: (properties: ToolProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
895
|
+
declare const PLUGIN_ACTIVATED: (properties: ToolProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
896
|
+
declare const EXTENSION_USED: (properties: ToolProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
897
|
+
declare const WEB_SEARCH_PERFORMED: (properties: SearchProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
898
|
+
declare const CITATION_ADDED: (properties: SearchProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
899
|
+
declare const BROWSE_SESSION_STARTED: (properties: SearchProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
900
|
+
declare const PAGE_CONTENT_FETCHED: (properties: SearchProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
901
|
+
declare const SEARCH_RESULTS_RANKED: (properties: SearchProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
902
|
+
declare const EXTERNAL_SOURCE_ACCESSED: (properties: SearchProperties, options?: EmitterOptions) => EmitterTrackPayload;
|
|
903
|
+
//#endregion
|
|
904
|
+
//#region src/shared/emitters/ai/events/agent.d.ts
|
|
905
|
+
declare function agentCreated(properties: AgentProperties, options?: EmitterOptions): EmitterTrackPayload;
|
|
906
|
+
declare function agentExecutionStarted(properties: AgentProperties, options?: EmitterOptions): EmitterTrackPayload;
|
|
907
|
+
declare function agentExecutionCompleted(properties: CompletionProperties, options?: EmitterOptions): EmitterTrackPayload;
|
|
908
|
+
declare function agentExecutionFailed(properties: CompletionProperties & {
|
|
909
|
+
error_message: string;
|
|
910
|
+
}, options?: EmitterOptions): EmitterTrackPayload;
|
|
911
|
+
//#endregion
|
|
912
|
+
//#region src/shared/emitters/ai/events/chat.d.ts
|
|
913
|
+
declare function chatSessionStarted(properties: SessionProperties, options?: EmitterOptions): EmitterTrackPayload;
|
|
914
|
+
declare function chatSessionEnded(properties: SessionProperties, options?: EmitterOptions): EmitterTrackPayload;
|
|
915
|
+
declare function chatMessageSent(properties: ChatMessageProperties, options?: EmitterOptions): EmitterTrackPayload;
|
|
916
|
+
declare function chatMessageReceived(properties: ChatMessageProperties, options?: EmitterOptions): EmitterTrackPayload;
|
|
917
|
+
//#endregion
|
|
918
|
+
//#region src/shared/emitters/ai/events/chatbot-ecommerce.d.ts
|
|
919
|
+
declare const MAX_PRODUCT_IDS = 20;
|
|
920
|
+
declare function chatbotIntentDetected(properties: ChatbotEcommerceProperties & {
|
|
921
|
+
message: string;
|
|
922
|
+
}, options?: EmitterOptions): EmitterTrackPayload;
|
|
923
|
+
declare function chatbotCartAssisted(properties: ChatbotEcommerceProperties, options?: EmitterOptions): EmitterTrackPayload;
|
|
924
|
+
declare function chatbotOrderAssisted(properties: ChatbotEcommerceProperties, options?: EmitterOptions): EmitterTrackPayload;
|
|
925
|
+
declare function chatbotProductRecommended(properties: ChatbotEcommerceProperties, options?: EmitterOptions): EmitterTrackPayload;
|
|
926
|
+
//#endregion
|
|
927
|
+
//#region src/shared/emitters/ai/events/completion.d.ts
|
|
928
|
+
declare function completionRequested(properties: CompletionProperties, options?: EmitterOptions): EmitterTrackPayload;
|
|
929
|
+
declare function completionGenerated(properties: CompletionProperties, options?: EmitterOptions): EmitterTrackPayload;
|
|
930
|
+
declare function completionFailed(properties: CompletionProperties & {
|
|
931
|
+
error_message: string;
|
|
932
|
+
}, options?: EmitterOptions): EmitterTrackPayload;
|
|
933
|
+
//#endregion
|
|
934
|
+
//#region src/shared/emitters/ai/events/streaming.d.ts
|
|
935
|
+
declare function streamStarted(properties: StreamingSDKProperties, options?: EmitterOptions): EmitterTrackPayload;
|
|
936
|
+
declare function streamChunkReceived(properties: StreamingSDKProperties, options?: EmitterOptions): EmitterTrackPayload;
|
|
937
|
+
declare function streamCompleted(properties: StreamingSDKProperties, options?: EmitterOptions): EmitterTrackPayload;
|
|
938
|
+
declare function streamFailed(properties: StreamingSDKProperties & {
|
|
939
|
+
error_message: string;
|
|
940
|
+
}, options?: EmitterOptions): EmitterTrackPayload;
|
|
941
|
+
//#endregion
|
|
942
|
+
//#region src/shared/emitters/ai/events/tool.d.ts
|
|
943
|
+
declare function toolCallStarted(properties: ToolCallSDKProperties, options?: EmitterOptions): EmitterTrackPayload;
|
|
944
|
+
declare function toolCallCompleted(properties: ToolCallSDKProperties, options?: EmitterOptions): EmitterTrackPayload;
|
|
945
|
+
declare function toolCallFailed(properties: ToolCallSDKProperties & {
|
|
946
|
+
error_message: string;
|
|
947
|
+
}, options?: EmitterOptions): EmitterTrackPayload;
|
|
948
|
+
declare namespace index_d_exports {
|
|
949
|
+
export { AIEventCategory, AIEventName, AIEventProperties, AIEventSpec, AISdkEventSpec, AI_EVENTS, AI_SDK_EVENTS, APICallProperties, API_REQUEST_MADE, ARTIFACT_CREATED, ARTIFACT_EDITED, ARTIFACT_EXECUTED, ARTIFACT_FORKED, ARTIFACT_PUBLISHED, AgentProperties, ArtifactProperties, BATCH_FILES_PROCESSED, BRANCH_CREATED, BRANCH_MERGED, BROWSE_SESSION_STARTED, BUG_REPORTED, BaseAIProperties, BaseAISDKProperties, BranchProperties, CANVAS_OPENED, CITATION_ADDED, CODE_COPIED, CODE_DEBUGGED, CODE_EXECUTED, CODE_EXPLAINED, CODE_GENERATED, CODE_REFACTORED, CODE_TRANSLATED, COMMENT_ADDED, COMPLETION_GENERATED, CONTENT_COPIED, CONTENT_DOWNLOADED, CONTENT_SHARED, CONTEXT_WINDOW_UPDATED, CONVERSATION_ARCHIVED, CONVERSATION_DELETED, CONVERSATION_ENDED, CONVERSATION_FORKED, CONVERSATION_RENAMED, CONVERSATION_RESUMED, CONVERSATION_SHARED, CONVERSATION_STARTED, CUSTOM_INSTRUCTIONS_UPDATED, CanvasProperties, ChatMessageProperties, ChatbotEcommerceProperties, CitationProperties, CodeGenerationProperties, CollaborationProperties, CommentProperties, CompletionProperties, ContentGenerationProperties, ContextProperties, ConversationManagementProperties, ConversationProperties, CopyExportProperties, CostTrackingProperties, CustomInstructionsProperties, DIFF_VIEWED, DOCUMENT_CREATED, EMAIL_DRAFTED, EMBEDDING_GENERATED, ERROR_OCCURRED, EXTENSION_USED, EXTERNAL_SOURCE_ACCESSED, ErrorProperties, FEATURE_REQUESTED, FEEDBACK_PROVIDED, FILE_DELETED, FILE_DOWNLOADED, FILE_PROCESSED, FILE_PROCESSING_FAILED, FILE_REFERENCED, FILE_UPLOADED, FILTER_APPLIED, FOLDER_CREATED, FUNCTION_EXECUTED, FeedbackProperties, FileAnalysisProperties, FileProperties, FileUploadProperties, FolderProperties, HARMFUL_CONTENT_FLAGGED, IMAGE_EDITED, IMAGE_GENERATED, INLINE_EDIT_APPLIED, ImageAnalysisProperties, ImageGenerationProperties, IssueReportProperties, KNOWLEDGE_BASE_QUERIED, LIVE_PREVIEW_TOGGLED, LatencyProperties, MAX_PRODUCT_IDS, MEMBER_INVITED, MEMORY_CREATED, MEMORY_DELETED, MEMORY_RETRIEVED, MEMORY_UPDATED, MESSAGE_DELETED, MESSAGE_EDITED, MESSAGE_RECEIVED, MESSAGE_REGENERATED, MESSAGE_SENT, MODEL_SWITCHED, MemoryProperties, MessageEditProperties, MessageProperties, ModelConfigProperties, ModelSelectionProperties, OUTLINE_CREATED, PAGE_CONTENT_FETCHED, PERFORMANCE_MEASURED, PERMISSION_CHANGED, PLUGIN_ACTIVATED, PROJECT_CONTEXT_LOADED, ParameterAdjustmentProperties, PerformanceProperties, PluginProperties, QUALITY_ISSUE_REPORTED, RAG_QUERY_EXECUTED, RATE_LIMIT_HIT, RESPONSE_RATED, REWRITE_GENERATED, RateLimitProperties, RegenerationProperties, SEARCH_PERFORMED, SEARCH_RESULTS_RANKED, SETTINGS_UPDATED, STOP_GENERATION, STREAMING_CHUNK_RECEIVED, STREAMING_COMPLETED, STREAMING_STARTED, SUGGESTION_ACCEPTED, SUGGESTION_REJECTED, SUMMARY_GENERATED, SafetyProperties, SearchProperties, SessionProperties, ShareProperties, StopGenerationProperties, StreamingProperties, StreamingSDKProperties, SummaryProperties, SystemProperties, TAG_ADDED, TEXT_GENERATED, TOKEN_USAGE_TRACKED, TOOL_CALL_COMPLETED, TOOL_CALL_FAILED, TOOL_CALL_STARTED, TRANSLATION_GENERATED, TeamProperties, TemplateProperties, TextGenerationProperties, TokenUsageProperties, ToolCallProperties, ToolCallSDKProperties, ToolProperties, TranslationProperties, UserInteractionProperties, VoiceProperties, WEB_SEARCH_PERFORMED, WORKSPACE_CREATED, WebBrowseProperties, WebSearchProperties, WorkspaceProperties, agentCreated, agentExecutionCompleted, agentExecutionFailed, agentExecutionStarted, calculateCompletionMetrics, calculateCost, calculateQualityScore, chatMessageReceived, chatMessageSent, chatSessionEnded, chatSessionStarted, chatbotCartAssisted, chatbotIntentDetected, chatbotOrderAssisted, chatbotProductRecommended, cleanProperties, completionFailed, completionGenerated, completionRequested, createAISDKTracker, createAITracker, detectChatbotIntent, detectIntent, detectSentiment, extractModelProvider, extractProductMentions, generateOperationId, needsClarification, normalizeBaseProperties, normalizeModelConfig, normalizeTokenUsage, safeStringify, sanitizeErrorMessage, streamChunkReceived, streamCompleted, streamFailed, streamStarted, toolCallCompleted, toolCallFailed, toolCallStarted, trackAI, trackAISDK, truncateArray, validateRequiredProperties };
|
|
950
|
+
}
|
|
951
|
+
//#endregion
|
|
952
|
+
export { index_d_exports as t };
|
|
953
|
+
//# sourceMappingURL=index-BkIWe--N.d.mts.map
|