@n8n/telemetry 1.7.0 → 1.9.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.
@@ -1,8 +1,56 @@
1
1
  import { z } from 'zod/v4';
2
2
  export declare const INSTANCE_AI_TELEMETRY: {
3
+ readonly SETUP_PANEL_STATE_OBSERVED: {
4
+ readonly name: "AI Assistant setup panel state observed";
5
+ readonly description: "The setup panel observed a new requirement snapshot. Also fires when no setup is needed, including workflows whose credentials were already connected.";
6
+ readonly properties: z.ZodObject<{
7
+ workflow_id: z.ZodString;
8
+ thread_id: z.ZodString;
9
+ credential_count: z.ZodNumber;
10
+ pending_credential_count: z.ZodNumber;
11
+ pending_parameter_count: z.ZodNumber;
12
+ already_connected_count: z.ZodNumber;
13
+ }, z.core.$strip>;
14
+ } & import("../define").TelemetryEventInput & {
15
+ readonly getValidationError: (properties: unknown) => string | null;
16
+ };
17
+ readonly SETUP_PANEL_ITEM_SHOWN: {
18
+ readonly name: "AI Assistant setup panel item shown";
19
+ readonly description: "A setup checklist row became visible. Reopening the same row within the mounted panel does not emit another event.";
20
+ readonly properties: z.ZodObject<{
21
+ workflow_id: z.ZodString;
22
+ thread_id: z.ZodString;
23
+ kind: z.ZodEnum<{
24
+ credential: "credential";
25
+ details: "details";
26
+ parameters: "parameters";
27
+ }>;
28
+ credential_type: z.ZodOptional<z.ZodString>;
29
+ parameter_count: z.ZodNumber;
30
+ }, z.core.$strip>;
31
+ } & import("../define").TelemetryEventInput & {
32
+ readonly getValidationError: (properties: unknown) => string | null;
33
+ };
34
+ readonly SETUP_PANEL_DISMISSED: {
35
+ readonly name: "AI Assistant setup panel dismissed";
36
+ readonly description: "A visible setup panel closed. The reason separates navigation and removed requirements from a finished execution or an explicit dismissal.";
37
+ readonly properties: z.ZodObject<{
38
+ workflow_id: z.ZodString;
39
+ thread_id: z.ZodString;
40
+ reason: z.ZodEnum<{
41
+ execution_finished: "execution_finished";
42
+ execution_succeeded: "execution_succeeded";
43
+ items_removed: "items_removed";
44
+ navigation: "navigation";
45
+ user_dismissed: "user_dismissed";
46
+ }>;
47
+ }, z.core.$strip>;
48
+ } & import("../define").TelemetryEventInput & {
49
+ readonly getValidationError: (properties: unknown) => string | null;
50
+ };
3
51
  readonly USER_CLICKED_AI_CREDIT_BALANCE: {
4
52
  readonly name: "User clicked AI credit balance";
5
- readonly description: "The user clicked the AI Assistant credit balance button to open or close the balance dropdown.";
53
+ readonly description: "The user clicked the n8n Assistant credit balance button to open or close the balance dropdown.";
6
54
  readonly properties: z.ZodObject<{}, z.core.$strip>;
7
55
  } & import("../define").TelemetryEventInput & {
8
56
  readonly getValidationError: (properties: unknown) => string | null;
@@ -43,7 +91,7 @@ export declare const INSTANCE_AI_TELEMETRY: {
43
91
  };
44
92
  readonly OPEN_BY_DEFAULT_NOTIFICATION_SHOWN: {
45
93
  readonly name: "Open in assistant notification shown";
46
- readonly description: "The open-by-default experiment notification rendered after a workflow list card auto-opened in the AI Assistant.";
94
+ readonly description: "The open-by-default experiment notification rendered after a workflow list card auto-opened in the n8n Assistant.";
47
95
  readonly properties: z.ZodObject<{
48
96
  workflow_id: z.ZodNullable<z.ZodString>;
49
97
  variant: z.ZodEnum<{
@@ -82,7 +130,7 @@ export declare const INSTANCE_AI_TELEMETRY: {
82
130
  };
83
131
  readonly DEFAULT_EDITOR_PREFERENCE_CHANGED: {
84
132
  readonly name: "Default editor preference changed";
85
- readonly description: "The user saved the default-editor preference on the AI Assistant settings page.";
133
+ readonly description: "The user saved the default-editor preference on the n8n Assistant settings page.";
86
134
  readonly properties: z.ZodObject<{
87
135
  value: z.ZodEnum<{
88
136
  assistant: "assistant";
@@ -120,14 +168,14 @@ export declare const INSTANCE_AI_TELEMETRY: {
120
168
  };
121
169
  readonly USER_CLICKED_AI_ASSISTANT_INPUT_PLUS_BUTTON: {
122
170
  readonly name: "User clicked AI Assistant input plus button";
123
- readonly description: "The user clicked the plus button in the AI Assistant input.";
171
+ readonly description: "The user clicked the plus button in the n8n Assistant input.";
124
172
  readonly properties: z.ZodObject<{}, z.core.$strip>;
125
173
  } & import("../define").TelemetryEventInput & {
126
174
  readonly getValidationError: (properties: unknown) => string | null;
127
175
  };
128
176
  readonly TOOLS_LIST_OPENED: {
129
177
  readonly name: "Instance AI tools list opened";
130
- readonly description: "The user opened the AI Assistant tools connection modal.";
178
+ readonly description: "The user opened the n8n Assistant tools connection modal.";
131
179
  readonly properties: z.ZodObject<{
132
180
  source: z.ZodEnum<{
133
181
  input_menu: "input_menu";
@@ -139,7 +187,7 @@ export declare const INSTANCE_AI_TELEMETRY: {
139
187
  };
140
188
  readonly MCP_SETTINGS_OPENED: {
141
189
  readonly name: "Instance AI mcp settings opened";
142
- readonly description: "The user opened settings for an MCP connection in the AI Assistant.";
190
+ readonly description: "The user opened settings for an MCP connection in the n8n Assistant.";
143
191
  readonly properties: z.ZodObject<{
144
192
  server_slug: z.ZodString;
145
193
  source: z.ZodEnum<{
@@ -230,11 +278,46 @@ export declare const INSTANCE_AI_TELEMETRY: {
230
278
  };
231
279
  readonly BROWSER_USE_DIRECT_CONNECT_REQUESTED: {
232
280
  readonly name: "Instance AI Browser Use direct connect requested";
233
- readonly description: "The AI Assistant requested a direct connection through the Browser Use extension.";
281
+ readonly description: "The n8n Assistant requested a direct connection through the Browser Use extension.";
234
282
  readonly properties: z.ZodObject<{}, z.core.$strip>;
235
283
  } & import("../define").TelemetryEventInput & {
236
284
  readonly getValidationError: (properties: unknown) => string | null;
237
285
  };
286
+ readonly USER_RECEIVED_AI_ASSISTANT_RESPONSE: {
287
+ readonly name: "User received AI Assistant response";
288
+ readonly description: "The initial foreground AI Assistant reply was rendered after a user submitted a chat message. Starts before attachment processing and first-thread creation, then fires once when the initial run completes or pauses for user input. Automated follow-up runs do not create another sample.";
289
+ readonly properties: z.ZodObject<{
290
+ instance_id: z.ZodString;
291
+ thread_id: z.ZodString;
292
+ run_id: z.ZodString;
293
+ latency_ms: z.ZodNumber;
294
+ is_first_user_message: z.ZodBoolean;
295
+ response_kind: z.ZodEnum<{
296
+ awaiting_input: "awaiting_input";
297
+ completed: "completed";
298
+ }>;
299
+ action_source: z.ZodEnum<{
300
+ agent_builder_page: "agent_builder_page";
301
+ agent_preview: "agent_preview";
302
+ assistant_page: "assistant_page";
303
+ canvas_action_button: "canvas_action_button";
304
+ canvas_choice_prompt: "canvas_choice_prompt";
305
+ credential_edit: "credential_edit";
306
+ credentials_list: "credentials_list";
307
+ evals: "evals";
308
+ node_error_view: "node_error_view";
309
+ playwright: "playwright";
310
+ "template-view": "template-view";
311
+ unknown: "unknown";
312
+ "website-template": "website-template";
313
+ workflow_list_auto: "workflow_list_auto";
314
+ workflow_list_button: "workflow_list_button";
315
+ }>;
316
+ tab_visible: z.ZodBoolean;
317
+ }, z.core.$strip>;
318
+ } & import("../define").TelemetryEventInput & {
319
+ readonly getValidationError: (properties: unknown) => string | null;
320
+ };
238
321
  readonly COMPUTER_USE_MODAL_OPENED: {
239
322
  readonly name: "User opened computer use connection modal";
240
323
  readonly description: "The user opened the Computer Use connection interface.";
@@ -279,7 +362,7 @@ export declare const INSTANCE_AI_TELEMETRY: {
279
362
  };
280
363
  readonly USER_VIEWED_AI_ASSISTANT_SETUP_PAGE: {
281
364
  readonly name: "User viewed AI Assistant setup page";
282
- readonly description: "The user landed on a self-hosted AI Assistant setup surface: the onboarding takeover on /assistant, or the settings page on /settings/assistant. Carries the configuration snapshot at view time, so joined with \"AI Assistant setup completed\" it measures setup drop-off. Not emitted on cloud or proxy deployments, where setup is managed.";
365
+ readonly description: "The user landed on a self-hosted n8n Assistant setup surface: the onboarding takeover on /assistant, or the settings page on /settings/assistant. Carries the configuration snapshot at view time, so joined with \"AI Assistant setup completed\" it measures setup drop-off. Not emitted on cloud or proxy deployments, where setup is managed.";
283
366
  readonly properties: z.ZodObject<{
284
367
  model_source: z.ZodEnum<{
285
368
  env: "env";
@@ -317,7 +400,7 @@ export declare const INSTANCE_AI_TELEMETRY: {
317
400
  };
318
401
  readonly USER_CONFIGURED_AI_ASSISTANT_MODEL: {
319
402
  readonly name: "User configured AI Assistant model";
320
- readonly description: "An admin saved an AI Assistant model connection (PUT /instance-ai/settings), covering the first connect, later changes, and same-provider key rotations: first connects are rows where previous_provider is absent. The event marks a saved configuration, not a verified one — the setup wizard verifies before saving, but a direct API save can skip verification. Env-var model config never emits this; it is visible on \"Instance started\" and on the snapshot events instead.";
403
+ readonly description: "An admin saved an n8n Assistant model connection (PUT /instance-ai/settings), covering the first connect, later changes, and same-provider key rotations: first connects are rows where previous_provider is absent. The event marks a saved configuration, not a verified one — the setup wizard verifies before saving, but a direct API save can skip verification. Env-var model config never emits this; it is visible on \"Instance started\" and on the snapshot events instead.";
321
404
  readonly properties: z.ZodObject<{
322
405
  provider: z.ZodString;
323
406
  model: z.ZodString;
@@ -329,7 +412,7 @@ export declare const INSTANCE_AI_TELEMETRY: {
329
412
  };
330
413
  readonly USER_CONFIGURED_AI_ASSISTANT_SANDBOX: {
331
414
  readonly name: "User configured AI Assistant sandbox";
332
- readonly description: "An admin saved an AI Assistant sandbox connection (PUT /instance-ai/settings), covering the first connect, later changes, and same-provider key rotations: first connects are rows where previous_sandbox_type is absent. Env-var sandbox config never emits this.";
415
+ readonly description: "An admin saved an n8n Assistant sandbox connection (PUT /instance-ai/settings), covering the first connect, later changes, and same-provider key rotations: first connects are rows where previous_sandbox_type is absent. Env-var sandbox config never emits this.";
333
416
  readonly properties: z.ZodObject<{
334
417
  sandbox_type: z.ZodEnum<{
335
418
  daytona: "daytona";
@@ -345,7 +428,7 @@ export declare const INSTANCE_AI_TELEMETRY: {
345
428
  };
346
429
  readonly USER_CONFIGURED_AI_ASSISTANT_WEB_SEARCH: {
347
430
  readonly name: "User configured AI Assistant web search";
348
- readonly description: "An admin saved an AI Assistant web search connection (PUT /instance-ai/settings), covering the first connect, later changes, and same-provider key rotations: first connects are rows where previous_provider is absent. Explicitly disabling web search does not emit this; that decision is visible as web_search_source \"disabled\" on the snapshot events.";
431
+ readonly description: "An admin saved an n8n Assistant web search connection (PUT /instance-ai/settings), covering the first connect, later changes, and same-provider key rotations: first connects are rows where previous_provider is absent. Explicitly disabling web search does not emit this; that decision is visible as web_search_source \"disabled\" on the snapshot events.";
349
432
  readonly properties: z.ZodObject<{
350
433
  provider: z.ZodEnum<{
351
434
  brave: "brave";
@@ -386,7 +469,7 @@ export declare const INSTANCE_AI_TELEMETRY: {
386
469
  };
387
470
  readonly AI_ASSISTANT_SETUP_COMPLETED: {
388
471
  readonly name: "AI Assistant setup completed";
389
- readonly description: "A self-hosted instance reached a complete AI Assistant setup for the first time: model configured, sandbox configured, and web search decided (configured or explicitly disabled) — the same predicate that unlocks the assistant UI. Fires at most once per instance, guarded by a persisted settings key, regardless of how the last piece was set: emitted from the settings save path, with a boot-time check so an env-var finish is also counted. No \"User\" prefix because the last piece can land via env vars with no acting user.";
472
+ readonly description: "A self-hosted instance reached a complete n8n Assistant setup for the first time: model configured, sandbox configured, and web search decided (configured or explicitly disabled) — the same predicate that unlocks the assistant UI. Fires at most once per instance, guarded by a persisted settings key, regardless of how the last piece was set: emitted from the settings save path, with a boot-time check so an env-var finish is also counted. No \"User\" prefix because the last piece can land via env vars with no acting user.";
390
473
  readonly properties: z.ZodObject<{
391
474
  model_source: z.ZodEnum<{
392
475
  env: "env";
@@ -443,6 +526,50 @@ export declare const INSTANCE_AI_TELEMETRY: {
443
526
  } & import("../define").TelemetryEventInput & {
444
527
  readonly getValidationError: (properties: unknown) => string | null;
445
528
  };
529
+ readonly USER_SENT_BUILDER_MESSAGE: {
530
+ readonly name: "User sent builder message";
531
+ readonly description: "The user sent a message to the n8n Assistant. Fires once per message on the optimistic send, before the request is admitted, so a refused send still counts as an attempt. Carries who wrote the text: a pre-fill is an opener n8n composed (a failed execution, a credential modal, a template card, a suggestion chip) that the user accepted or edited, so pre-fill share must be read from prefill_type rather than matched against the message body.";
532
+ readonly properties: z.ZodObject<{
533
+ thread_id: z.ZodString;
534
+ instance_id: z.ZodString;
535
+ is_first_message: z.ZodBoolean;
536
+ action_source: z.ZodEnum<{
537
+ agent_builder_page: "agent_builder_page";
538
+ agent_preview: "agent_preview";
539
+ assistant_page: "assistant_page";
540
+ canvas_action_button: "canvas_action_button";
541
+ canvas_choice_prompt: "canvas_choice_prompt";
542
+ credential_edit: "credential_edit";
543
+ credentials_list: "credentials_list";
544
+ evals: "evals";
545
+ node_error_view: "node_error_view";
546
+ playwright: "playwright";
547
+ "template-view": "template-view";
548
+ unknown: "unknown";
549
+ "website-template": "website-template";
550
+ workflow_list_auto: "workflow_list_auto";
551
+ workflow_list_button: "workflow_list_button";
552
+ }>;
553
+ prefill_type: z.ZodNullable<z.ZodEnum<{
554
+ contextual_followup: "contextual_followup";
555
+ handoff_agent_change_request: "handoff_agent_change_request";
556
+ handoff_credential_setup: "handoff_credential_setup";
557
+ handoff_execution_error: "handoff_execution_error";
558
+ handoff_fix_with_ai: "handoff_fix_with_ai";
559
+ handoff_setup_panel_execute: "handoff_setup_panel_execute";
560
+ suggestion_catalog: "suggestion_catalog";
561
+ template_adjustment: "template_adjustment";
562
+ template_example: "template_example";
563
+ unknown: "unknown";
564
+ v1_opener: "v1_opener";
565
+ workflow_attachment_opener: "workflow_attachment_opener";
566
+ }>>;
567
+ prefill_id: z.ZodNullable<z.ZodString>;
568
+ prompt_modified: z.ZodNullable<z.ZodBoolean>;
569
+ }, z.core.$strip>;
570
+ } & import("../define").TelemetryEventInput & {
571
+ readonly getValidationError: (properties: unknown) => string | null;
572
+ };
446
573
  readonly BUILDER_LISTED_WORKFLOWS: {
447
574
  readonly name: "Builder listed workflows";
448
575
  readonly description: "Instance AI called workflows(action=\"list\"). Emitted on every list call, in both arms of the folder-exploration rollout, so folder-scoped calls have a denominator. Carries no folder names.";
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.INSTANCE_AI_TELEMETRY = void 0;
4
+ const api_types_1 = require("@n8n/api-types");
4
5
  const v4_1 = require("zod/v4");
5
6
  const define_1 = require("../define");
6
7
  const setupSnapshotProps = {
@@ -25,10 +26,53 @@ const setupSnapshotProps = {
25
26
  const freeNudgeVariant = v4_1.z.enum(['control', 'variant-1', 'variant-2']);
26
27
  const freeNudgeTreatmentVariant = v4_1.z.enum(['variant-1', 'variant-2']);
27
28
  const openWorkflowInAssistantVariant = v4_1.z.enum(['control', 'variant']);
29
+ const threadActionSource = v4_1.z.enum([
30
+ ...api_types_1.INSTANCE_AI_THREAD_SOURCES,
31
+ api_types_1.INSTANCE_AI_THREAD_SOURCE_FALLBACK,
32
+ ]);
33
+ const prefillType = v4_1.z.enum([...api_types_1.INSTANCE_AI_PREFILL_TYPES, api_types_1.INSTANCE_AI_PREFILL_TYPE_FALLBACK]);
28
34
  exports.INSTANCE_AI_TELEMETRY = (0, define_1.defineTelemetryEvents)({
35
+ SETUP_PANEL_STATE_OBSERVED: {
36
+ name: 'AI Assistant setup panel state observed',
37
+ description: 'The setup panel observed a new requirement snapshot. Also fires when no setup is needed, including workflows whose credentials were already connected.',
38
+ properties: v4_1.z.object({
39
+ workflow_id: v4_1.z.string(),
40
+ thread_id: v4_1.z.string(),
41
+ credential_count: v4_1.z.number(),
42
+ pending_credential_count: v4_1.z.number(),
43
+ pending_parameter_count: v4_1.z.number(),
44
+ already_connected_count: v4_1.z.number(),
45
+ }),
46
+ },
47
+ SETUP_PANEL_ITEM_SHOWN: {
48
+ name: 'AI Assistant setup panel item shown',
49
+ description: 'A setup checklist row became visible. Reopening the same row within the mounted panel does not emit another event.',
50
+ properties: v4_1.z.object({
51
+ workflow_id: v4_1.z.string(),
52
+ thread_id: v4_1.z.string(),
53
+ kind: v4_1.z.enum(['credential', 'parameters', 'details']),
54
+ credential_type: v4_1.z.string().optional(),
55
+ parameter_count: v4_1.z.number(),
56
+ }),
57
+ },
58
+ SETUP_PANEL_DISMISSED: {
59
+ name: 'AI Assistant setup panel dismissed',
60
+ description: 'A visible setup panel closed. The reason separates navigation and removed requirements from a finished execution or an explicit dismissal.',
61
+ properties: v4_1.z.object({
62
+ workflow_id: v4_1.z.string(),
63
+ thread_id: v4_1.z.string(),
64
+ reason: v4_1.z.enum([
65
+ 'navigation',
66
+ 'items_removed',
67
+ 'execution_succeeded',
68
+ 'execution_finished',
69
+ 'user_dismissed',
70
+ ]),
71
+ }),
72
+ },
29
73
  USER_CLICKED_AI_CREDIT_BALANCE: {
30
74
  name: 'User clicked AI credit balance',
31
- description: 'The user clicked the AI Assistant credit balance button to open or close the balance dropdown.',
75
+ description: 'The user clicked the n8n Assistant credit balance button to open or close the balance dropdown.',
32
76
  properties: v4_1.z.object({}),
33
77
  },
34
78
  FREE_NUDGE_EXPOSED: {
@@ -49,7 +93,7 @@ exports.INSTANCE_AI_TELEMETRY = (0, define_1.defineTelemetryEvents)({
49
93
  },
50
94
  OPEN_BY_DEFAULT_NOTIFICATION_SHOWN: {
51
95
  name: 'Open in assistant notification shown',
52
- description: 'The open-by-default experiment notification rendered after a workflow list card auto-opened in the AI Assistant.',
96
+ description: 'The open-by-default experiment notification rendered after a workflow list card auto-opened in the n8n Assistant.',
53
97
  properties: v4_1.z.object({
54
98
  workflow_id: v4_1.z.string().nullable(),
55
99
  variant: openWorkflowInAssistantVariant,
@@ -67,7 +111,7 @@ exports.INSTANCE_AI_TELEMETRY = (0, define_1.defineTelemetryEvents)({
67
111
  },
68
112
  DEFAULT_EDITOR_PREFERENCE_CHANGED: {
69
113
  name: 'Default editor preference changed',
70
- description: 'The user saved the default-editor preference on the AI Assistant settings page.',
114
+ description: 'The user saved the default-editor preference on the n8n Assistant settings page.',
71
115
  properties: v4_1.z.object({
72
116
  value: v4_1.z.enum(['assistant', 'manual']),
73
117
  variant: openWorkflowInAssistantVariant,
@@ -86,19 +130,19 @@ exports.INSTANCE_AI_TELEMETRY = (0, define_1.defineTelemetryEvents)({
86
130
  },
87
131
  USER_CLICKED_AI_ASSISTANT_INPUT_PLUS_BUTTON: {
88
132
  name: 'User clicked AI Assistant input plus button',
89
- description: 'The user clicked the plus button in the AI Assistant input.',
133
+ description: 'The user clicked the plus button in the n8n Assistant input.',
90
134
  properties: v4_1.z.object({}),
91
135
  },
92
136
  TOOLS_LIST_OPENED: {
93
137
  name: 'Instance AI tools list opened',
94
- description: 'The user opened the AI Assistant tools connection modal.',
138
+ description: 'The user opened the n8n Assistant tools connection modal.',
95
139
  properties: v4_1.z.object({
96
140
  source: v4_1.z.enum(['input_menu', 'mcp_connect_card']),
97
141
  }),
98
142
  },
99
143
  MCP_SETTINGS_OPENED: {
100
144
  name: 'Instance AI mcp settings opened',
101
- description: 'The user opened settings for an MCP connection in the AI Assistant.',
145
+ description: 'The user opened settings for an MCP connection in the n8n Assistant.',
102
146
  properties: v4_1.z.object({
103
147
  server_slug: v4_1.z.string(),
104
148
  source: v4_1.z.enum(['input_menu', 'mcp_connect_card']),
@@ -152,9 +196,33 @@ exports.INSTANCE_AI_TELEMETRY = (0, define_1.defineTelemetryEvents)({
152
196
  },
153
197
  BROWSER_USE_DIRECT_CONNECT_REQUESTED: {
154
198
  name: 'Instance AI Browser Use direct connect requested',
155
- description: 'The AI Assistant requested a direct connection through the Browser Use extension.',
199
+ description: 'The n8n Assistant requested a direct connection through the Browser Use extension.',
156
200
  properties: v4_1.z.object({}),
157
201
  },
202
+ USER_RECEIVED_AI_ASSISTANT_RESPONSE: {
203
+ name: 'User received AI Assistant response',
204
+ description: 'The initial foreground AI Assistant reply was rendered after a user submitted a chat message. Starts before attachment processing and first-thread creation, then fires once when the initial run completes or pauses for user input. Automated follow-up runs do not create another sample.',
205
+ properties: v4_1.z.object({
206
+ instance_id: v4_1.z.string(),
207
+ thread_id: v4_1.z.string(),
208
+ run_id: v4_1.z.string().describe('Run ID returned for the user-submitted message'),
209
+ latency_ms: v4_1.z
210
+ .number()
211
+ .int()
212
+ .nonnegative()
213
+ .describe('Milliseconds from submit intent until the initial foreground reply is rendered'),
214
+ is_first_user_message: v4_1.z
215
+ .boolean()
216
+ .describe("Whether this was the thread's first user message"),
217
+ response_kind: v4_1.z
218
+ .enum(['completed', 'awaiting_input'])
219
+ .describe('Whether the response completed the run or rendered an input request'),
220
+ action_source: threadActionSource,
221
+ tab_visible: v4_1.z
222
+ .boolean()
223
+ .describe('Whether the document was visible when the response rendered'),
224
+ }),
225
+ },
158
226
  COMPUTER_USE_MODAL_OPENED: {
159
227
  name: 'User opened computer use connection modal',
160
228
  description: 'The user opened the Computer Use connection interface.',
@@ -201,7 +269,7 @@ exports.INSTANCE_AI_TELEMETRY = (0, define_1.defineTelemetryEvents)({
201
269
  },
202
270
  USER_VIEWED_AI_ASSISTANT_SETUP_PAGE: {
203
271
  name: 'User viewed AI Assistant setup page',
204
- description: 'The user landed on a self-hosted AI Assistant setup surface: the onboarding takeover on /assistant, or the settings page on /settings/assistant. Carries the configuration snapshot at view time, so joined with "AI Assistant setup completed" it measures setup drop-off. Not emitted on cloud or proxy deployments, where setup is managed.',
272
+ description: 'The user landed on a self-hosted n8n Assistant setup surface: the onboarding takeover on /assistant, or the settings page on /settings/assistant. Carries the configuration snapshot at view time, so joined with "AI Assistant setup completed" it measures setup drop-off. Not emitted on cloud or proxy deployments, where setup is managed.',
205
273
  properties: v4_1.z.object({
206
274
  page: v4_1.z
207
275
  .enum(['onboarding', 'settings'])
@@ -211,7 +279,7 @@ exports.INSTANCE_AI_TELEMETRY = (0, define_1.defineTelemetryEvents)({
211
279
  },
212
280
  USER_CONFIGURED_AI_ASSISTANT_MODEL: {
213
281
  name: 'User configured AI Assistant model',
214
- description: 'An admin saved an AI Assistant model connection (PUT /instance-ai/settings), covering the first connect, later changes, and same-provider key rotations: first connects are rows where previous_provider is absent. The event marks a saved configuration, not a verified one — the setup wizard verifies before saving, but a direct API save can skip verification. Env-var model config never emits this; it is visible on "Instance started" and on the snapshot events instead.',
282
+ description: 'An admin saved an n8n Assistant model connection (PUT /instance-ai/settings), covering the first connect, later changes, and same-provider key rotations: first connects are rows where previous_provider is absent. The event marks a saved configuration, not a verified one — the setup wizard verifies before saving, but a direct API save can skip verification. Env-var model config never emits this; it is visible on "Instance started" and on the snapshot events instead.',
215
283
  properties: v4_1.z.object({
216
284
  provider: v4_1.z
217
285
  .string()
@@ -226,7 +294,7 @@ exports.INSTANCE_AI_TELEMETRY = (0, define_1.defineTelemetryEvents)({
226
294
  },
227
295
  USER_CONFIGURED_AI_ASSISTANT_SANDBOX: {
228
296
  name: 'User configured AI Assistant sandbox',
229
- description: 'An admin saved an AI Assistant sandbox connection (PUT /instance-ai/settings), covering the first connect, later changes, and same-provider key rotations: first connects are rows where previous_sandbox_type is absent. Env-var sandbox config never emits this.',
297
+ description: 'An admin saved an n8n Assistant sandbox connection (PUT /instance-ai/settings), covering the first connect, later changes, and same-provider key rotations: first connects are rows where previous_sandbox_type is absent. Env-var sandbox config never emits this.',
230
298
  properties: v4_1.z.object({
231
299
  sandbox_type: v4_1.z.enum(['n8n-sandbox', 'daytona']),
232
300
  previous_sandbox_type: v4_1.z
@@ -237,7 +305,7 @@ exports.INSTANCE_AI_TELEMETRY = (0, define_1.defineTelemetryEvents)({
237
305
  },
238
306
  USER_CONFIGURED_AI_ASSISTANT_WEB_SEARCH: {
239
307
  name: 'User configured AI Assistant web search',
240
- description: 'An admin saved an AI Assistant web search connection (PUT /instance-ai/settings), covering the first connect, later changes, and same-provider key rotations: first connects are rows where previous_provider is absent. Explicitly disabling web search does not emit this; that decision is visible as web_search_source "disabled" on the snapshot events.',
308
+ description: 'An admin saved an n8n Assistant web search connection (PUT /instance-ai/settings), covering the first connect, later changes, and same-provider key rotations: first connects are rows where previous_provider is absent. Explicitly disabling web search does not emit this; that decision is visible as web_search_source "disabled" on the snapshot events.',
241
309
  properties: v4_1.z.object({
242
310
  provider: v4_1.z.enum(['brave', 'searxng']),
243
311
  previous_provider: v4_1.z
@@ -274,7 +342,7 @@ exports.INSTANCE_AI_TELEMETRY = (0, define_1.defineTelemetryEvents)({
274
342
  },
275
343
  AI_ASSISTANT_SETUP_COMPLETED: {
276
344
  name: 'AI Assistant setup completed',
277
- description: 'A self-hosted instance reached a complete AI Assistant setup for the first time: model configured, sandbox configured, and web search decided (configured or explicitly disabled) — the same predicate that unlocks the assistant UI. Fires at most once per instance, guarded by a persisted settings key, regardless of how the last piece was set: emitted from the settings save path, with a boot-time check so an env-var finish is also counted. No "User" prefix because the last piece can land via env vars with no acting user.',
345
+ description: 'A self-hosted instance reached a complete n8n Assistant setup for the first time: model configured, sandbox configured, and web search decided (configured or explicitly disabled) — the same predicate that unlocks the assistant UI. Fires at most once per instance, guarded by a persisted settings key, regardless of how the last piece was set: emitted from the settings save path, with a boot-time check so an env-var finish is also counted. No "User" prefix because the last piece can land via env vars with no acting user.',
278
346
  properties: v4_1.z.object({ ...setupSnapshotProps }),
279
347
  },
280
348
  USER_ADDED_NODES_TO_CHAT: {
@@ -294,6 +362,29 @@ exports.INSTANCE_AI_TELEMETRY = (0, define_1.defineTelemetryEvents)({
294
362
  node_count: v4_1.z.number().describe('Total nodes attached across the sent message'),
295
363
  }),
296
364
  },
365
+ USER_SENT_BUILDER_MESSAGE: {
366
+ name: 'User sent builder message',
367
+ description: 'The user sent a message to the n8n Assistant. Fires once per message on the optimistic send, before the request is admitted, so a refused send still counts as an attempt. Carries who wrote the text: a pre-fill is an opener n8n composed (a failed execution, a credential modal, a template card, a suggestion chip) that the user accepted or edited, so pre-fill share must be read from prefill_type rather than matched against the message body.',
368
+ properties: v4_1.z.object({
369
+ thread_id: v4_1.z.string(),
370
+ instance_id: v4_1.z.string(),
371
+ is_first_message: v4_1.z
372
+ .boolean()
373
+ .describe('Whether this is the first user message in the thread'),
374
+ action_source: threadActionSource.describe("The thread's entry point, read back from thread metadata. 'unknown' covers threads created before source was required."),
375
+ prefill_type: prefillType
376
+ .nullable()
377
+ .describe("Which pre-fill surface composed the text. Null when the user typed it. 'unknown' is a read-path fallback for a pre-fill a previous deploy stashed in the browser, so a non-trivial share of it is a bug, not a category."),
378
+ prefill_id: v4_1.z
379
+ .string()
380
+ .nullable()
381
+ .describe('Catalog entry id for pre-fill types that have sub-items, e.g. a suggestion id. Null otherwise.'),
382
+ prompt_modified: v4_1.z
383
+ .boolean()
384
+ .nullable()
385
+ .describe('Whether the user edited the pre-filled text before sending. Always false for pre-fills that send without being shown. Null when the user typed the message.'),
386
+ }),
387
+ },
297
388
  BUILDER_LISTED_WORKFLOWS: {
298
389
  name: 'Builder listed workflows',
299
390
  description: 'Instance AI called workflows(action="list"). Emitted on every list call, in both arms of the folder-exploration rollout, so folder-scoped calls have a denominator. Carries no folder names.',
@@ -1 +1 @@
1
- {"version":3,"file":"instance-ai.js","sourceRoot":"","sources":["../../src/events/instance-ai.ts"],"names":[],"mappings":";;;AAAA,+BAA2B;AAE3B,sCAAkD;AAQlD,MAAM,kBAAkB,GAAG;IAC1B,YAAY,EAAE,MAAC;SACb,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;SAC3B,QAAQ,CAAC,8EAA8E,CAAC;IAC1F,cAAc,EAAE,MAAC;SACf,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,6EAA6E,CAAC;IACzF,UAAU,EAAE,MAAC;SACX,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACR,qNAAqN,CACrN;IACF,cAAc,EAAE,MAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;IAC7C,YAAY,EAAE,MAAC,CAAC,IAAI,CAAC,CAAC,aAAa,EAAE,SAAS,CAAC,CAAC,CAAC,QAAQ,EAAE;IAC3D,iBAAiB,EAAE,MAAC;SAClB,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC;SACvC,QAAQ,CACR,sFAAsF,CACtF;IACF,mBAAmB,EAAE,MAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,QAAQ,EAAE;CAC5D,CAAC;A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,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;YACtC,SAAS,EAAE,MAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,uCAAuC,CAAC;YACxE,YAAY,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,4BAA4B,CAAC;YACrE,KAAK,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,4CAA4C,CAAC;SAC9E,CAAC;KACF;CACD,CAAC,CAAC"}
@@ -1,5 +1,80 @@
1
1
  import { z } from 'zod/v4';
2
2
  export declare const MCP_TELEMETRY: {
3
+ readonly MCP_NUDGE_VIEWED: {
4
+ readonly name: "User viewed MCP nudge";
5
+ readonly description: "The MCP nudge modal opened after the user exported a workflow as JSON, imported one from a file or URL, copied nodes, or pasted workflow JSON onto the canvas. Fires only when the modal opens, so a trigger that the flag, the two-impression cap, an opt-out, or instance-level MCP access suppresses emits nothing. Each fire consumes one impression.";
6
+ readonly properties: z.ZodObject<{
7
+ surface: z.ZodEnum<{
8
+ copy: "copy";
9
+ export: "export";
10
+ import_file: "import_file";
11
+ import_url: "import_url";
12
+ paste: "paste";
13
+ }>;
14
+ }, z.core.$strip>;
15
+ } & import("../define").TelemetryEventInput & {
16
+ readonly getValidationError: (properties: unknown) => string | null;
17
+ };
18
+ readonly MCP_NUDGE_CONNECT_CLICKED: {
19
+ readonly name: "User clicked connect in MCP nudge";
20
+ readonly description: "The user clicked \"Connect n8n\" in the MCP nudge. The app navigates to the MCP settings page and abandons the export or import that opened the nudge. Kept separate from the skip and dismiss events so the connect-to-export click ratio stays computable.";
21
+ readonly properties: z.ZodObject<{
22
+ surface: z.ZodEnum<{
23
+ copy: "copy";
24
+ export: "export";
25
+ import_file: "import_file";
26
+ import_url: "import_url";
27
+ paste: "paste";
28
+ }>;
29
+ }, z.core.$strip>;
30
+ } & import("../define").TelemetryEventInput & {
31
+ readonly getValidationError: (properties: unknown) => string | null;
32
+ };
33
+ readonly MCP_NUDGE_SKIPPED: {
34
+ readonly name: "User skipped MCP nudge";
35
+ readonly description: "The user clicked \"Skip\" in the MCP nudge. The export or import that opened the nudge completes unchanged. Closing with × or Escape is \"User dismissed MCP nudge\" instead.";
36
+ readonly properties: z.ZodObject<{
37
+ surface: z.ZodEnum<{
38
+ copy: "copy";
39
+ export: "export";
40
+ import_file: "import_file";
41
+ import_url: "import_url";
42
+ paste: "paste";
43
+ }>;
44
+ }, z.core.$strip>;
45
+ } & import("../define").TelemetryEventInput & {
46
+ readonly getValidationError: (properties: unknown) => string | null;
47
+ };
48
+ readonly MCP_NUDGE_DISMISSED: {
49
+ readonly name: "User dismissed MCP nudge";
50
+ readonly description: "The user closed the MCP nudge with × or Escape without choosing an action. The export or import that opened the nudge completes unchanged.";
51
+ readonly properties: z.ZodObject<{
52
+ surface: z.ZodEnum<{
53
+ copy: "copy";
54
+ export: "export";
55
+ import_file: "import_file";
56
+ import_url: "import_url";
57
+ paste: "paste";
58
+ }>;
59
+ }, z.core.$strip>;
60
+ } & import("../define").TelemetryEventInput & {
61
+ readonly getValidationError: (properties: unknown) => string | null;
62
+ };
63
+ readonly MCP_NUDGE_OPTED_OUT: {
64
+ readonly name: "User opted out of MCP nudge";
65
+ readonly description: "The user checked \"Don't show this again\" in the MCP nudge. Fires when the checkbox is checked, independent of which button later closes the modal. The nudge never shows again for this user.";
66
+ readonly properties: z.ZodObject<{
67
+ surface: z.ZodEnum<{
68
+ copy: "copy";
69
+ export: "export";
70
+ import_file: "import_file";
71
+ import_url: "import_url";
72
+ paste: "paste";
73
+ }>;
74
+ }, z.core.$strip>;
75
+ } & import("../define").TelemetryEventInput & {
76
+ readonly getValidationError: (properties: unknown) => string | null;
77
+ };
3
78
  readonly USER_GAVE_MCP_ACCESS_TO_WORKFLOW: {
4
79
  readonly name: "User gave MCP access to workflow";
5
80
  readonly description: "A workflow was exposed over MCP.";
@@ -8,7 +8,45 @@ const clientBrand = v4_1.z
8
8
  .nullable()
9
9
  .describe('Client brand, mirroring MCP_CLIENT_BRAND_MATCHERS in @n8n/api-types');
10
10
  const clientType = v4_1.z.enum(['cli', 'ide', 'editor', 'assistant']).nullable();
11
+ const nudgeSurface = v4_1.z
12
+ .enum(['export', 'import_file', 'import_url', 'copy', 'paste'])
13
+ .describe('The action that opened the nudge: the Export JSON menu item, Import from file, Import from URL, copying nodes, or pasting workflow JSON onto the canvas');
11
14
  exports.MCP_TELEMETRY = (0, define_1.defineTelemetryEvents)({
15
+ MCP_NUDGE_VIEWED: {
16
+ name: 'User viewed MCP nudge',
17
+ description: 'The MCP nudge modal opened after the user exported a workflow as JSON, imported one from a file or URL, copied nodes, or pasted workflow JSON onto the canvas. Fires only when the modal opens, so a trigger that the flag, the two-impression cap, an opt-out, or instance-level MCP access suppresses emits nothing. Each fire consumes one impression.',
18
+ properties: v4_1.z.object({
19
+ surface: nudgeSurface,
20
+ }),
21
+ },
22
+ MCP_NUDGE_CONNECT_CLICKED: {
23
+ name: 'User clicked connect in MCP nudge',
24
+ description: 'The user clicked "Connect n8n" in the MCP nudge. The app navigates to the MCP settings page and abandons the export or import that opened the nudge. Kept separate from the skip and dismiss events so the connect-to-export click ratio stays computable.',
25
+ properties: v4_1.z.object({
26
+ surface: nudgeSurface,
27
+ }),
28
+ },
29
+ MCP_NUDGE_SKIPPED: {
30
+ name: 'User skipped MCP nudge',
31
+ description: 'The user clicked "Skip" in the MCP nudge. The export or import that opened the nudge completes unchanged. Closing with × or Escape is "User dismissed MCP nudge" instead.',
32
+ properties: v4_1.z.object({
33
+ surface: nudgeSurface,
34
+ }),
35
+ },
36
+ MCP_NUDGE_DISMISSED: {
37
+ name: 'User dismissed MCP nudge',
38
+ description: 'The user closed the MCP nudge with × or Escape without choosing an action. The export or import that opened the nudge completes unchanged.',
39
+ properties: v4_1.z.object({
40
+ surface: nudgeSurface,
41
+ }),
42
+ },
43
+ MCP_NUDGE_OPTED_OUT: {
44
+ name: 'User opted out of MCP nudge',
45
+ description: 'The user checked "Don\'t show this again" in the MCP nudge. Fires when the checkbox is checked, independent of which button later closes the modal. The nudge never shows again for this user.',
46
+ properties: v4_1.z.object({
47
+ surface: nudgeSurface,
48
+ }),
49
+ },
12
50
  USER_GAVE_MCP_ACCESS_TO_WORKFLOW: {
13
51
  name: 'User gave MCP access to workflow',
14
52
  description: 'A workflow was exposed over MCP.',