@n8n/telemetry 1.9.1 → 1.10.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.
Files changed (37) hide show
  1. package/dist/build.tsbuildinfo +1 -1
  2. package/dist/catalog.js +18 -16
  3. package/dist/catalog.js.map +1 -1
  4. package/dist/events/agents.d.ts +90 -0
  5. package/dist/events/agents.js +65 -0
  6. package/dist/events/agents.js.map +1 -1
  7. package/dist/events/context.d.ts +81 -5
  8. package/dist/events/context.js +73 -19
  9. package/dist/events/context.js.map +1 -1
  10. package/dist/events/credentials.d.ts +14 -3
  11. package/dist/events/credentials.js +12 -2
  12. package/dist/events/credentials.js.map +1 -1
  13. package/dist/events/instance-ai.d.ts +258 -1
  14. package/dist/events/instance-ai.js +232 -2
  15. package/dist/events/instance-ai.js.map +1 -1
  16. package/dist/events/mcp.d.ts +1 -0
  17. package/dist/events/mcp.js +1 -1
  18. package/dist/events/mcp.js.map +1 -1
  19. package/dist/events/{node-type-policies.d.ts → type-availability-policies.d.ts} +9 -9
  20. package/dist/events/{node-type-policies.js → type-availability-policies.js} +16 -16
  21. package/dist/events/type-availability-policies.js.map +1 -0
  22. package/dist/events/workflow.d.ts +110 -0
  23. package/dist/events/workflow.js +93 -0
  24. package/dist/events/workflow.js.map +1 -1
  25. package/dist/index.d.ts +3 -2
  26. package/dist/index.js +5 -3
  27. package/dist/index.js.map +1 -1
  28. package/dist/registry-checks.js +3 -2
  29. package/dist/registry-checks.js.map +1 -1
  30. package/dist/schemas.d.ts +5 -0
  31. package/dist/schemas.js +8 -0
  32. package/dist/schemas.js.map +1 -0
  33. package/dist/telemetry-events.d.ts +562 -18
  34. package/dist/telemetry-events.js +2 -2
  35. package/dist/telemetry-events.js.map +1 -1
  36. package/package.json +6 -6
  37. package/dist/events/node-type-policies.js.map +0 -1
@@ -3,19 +3,39 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CONTEXT_TELEMETRY = void 0;
4
4
  const v4_1 = require("zod/v4");
5
5
  const define_1 = require("../define");
6
+ const schemas_1 = require("../schemas");
6
7
  const scopeType = v4_1.z
7
8
  .enum(['user', 'project', 'instance'])
8
9
  .describe('Who the preference applies to: only its author, one project, or the whole instance');
9
10
  const textLength = v4_1.z
10
11
  .number()
11
12
  .describe('Character count of the preference text. The text itself is never reported');
12
- const surface = v4_1.z
13
+ const surfaceType = v4_1.z
13
14
  .enum(['ui', 'aia', 'mcp'])
14
15
  .describe('Surface the event came from, with the same values as the `source` column');
15
- const assistantSurface = v4_1.z
16
- .enum(['aia', 'mcp'])
17
- .describe('Assistant surface that acted. The settings area cannot fire this event');
18
16
  exports.CONTEXT_TELEMETRY = (0, define_1.defineTelemetryEvents)({
17
+ USER_VIEWED_PREFERENCES: {
18
+ name: 'User viewed preferences',
19
+ description: 'A user opened the preferences list in the Context settings area. Fires on every visit, so it is the first step of the create funnel and the only sign that somebody read their saved preferences without changing one.',
20
+ properties: v4_1.z.object({
21
+ count: v4_1.z
22
+ .number()
23
+ .describe('Preferences the user can see in total, not the number the page showed'),
24
+ scope_types: v4_1.z
25
+ .array(scopeType)
26
+ .describe('Distinct scopes on the page the visit loaded. The list pages at 50 rows, so a longer list reports the scopes of the first page only and does not cover `count`'),
27
+ }),
28
+ },
29
+ USER_OPENED_PREFERENCE_MODAL: {
30
+ name: 'User opened preference modal',
31
+ description: 'A user opened the create or edit dialog on the preferences settings page. Pairs with `User created preference` and `User updated preference`: an open with no save that follows is an abandoned edit, which no other event shows.',
32
+ properties: v4_1.z.object({
33
+ mode: v4_1.z
34
+ .enum(['new', 'edit'])
35
+ .describe('`new` is the Add button. `edit` is the pencil on an existing row'),
36
+ scope_type: scopeType.optional().describe('Scope of the row being edited. Absent on `new`'),
37
+ }),
38
+ },
19
39
  USER_CREATED_PREFERENCE: {
20
40
  name: 'User created preference',
21
41
  description: 'A user saved a new preference from the Context settings area. Fires once the save succeeds, so opening the modal and cancelling reports nothing.',
@@ -38,6 +58,9 @@ exports.CONTEXT_TELEMETRY = (0, define_1.defineTelemetryEvents)({
38
58
  .string()
39
59
  .optional()
40
60
  .describe('Present only when the resulting scope is a project'),
61
+ surface: surfaceType
62
+ .optional()
63
+ .describe('Where the user made the edit: `ui` is the settings page and `aia` the chat card. Absent on a row written before the chat card could edit'),
41
64
  }),
42
65
  },
43
66
  USER_DELETED_PREFERENCES: {
@@ -46,9 +69,16 @@ exports.CONTEXT_TELEMETRY = (0, define_1.defineTelemetryEvents)({
46
69
  properties: v4_1.z.object({
47
70
  count: v4_1.z.number().describe('How many preferences the operation deleted'),
48
71
  source: v4_1.z
49
- .enum(['row', 'bulk'])
50
- .describe('`row` is the per-row Delete button, `bulk` is the selection toolbar'),
72
+ .enum(['row', 'bulk', 'rejected'])
73
+ .describe('`row` is the per-row Delete button and `bulk` the selection toolbar on the settings page. `rejected` is the Undo on the chat card, Decline on the MCP review form, or the MCP undo tool: the user did not accept a preference the assistant saved, a late refusal of one they first let stand'),
51
74
  scope_types: v4_1.z.array(scopeType).describe('Distinct scopes the deleted preferences covered'),
75
+ surface: schemas_1.assistantSurfaceSchema
76
+ .optional()
77
+ .describe('Set on a `rejected` delete, to tell the chat card from an MCP client'),
78
+ seconds_since_saved: v4_1.z
79
+ .number()
80
+ .optional()
81
+ .describe('On a `rejected` delete, how long after the assistant write the user took it back. A short gap means the write itself was wrong, not a later change of mind'),
52
82
  }),
53
83
  },
54
84
  PREFERENCES_APPLIED_TO_TURN: {
@@ -60,7 +90,7 @@ exports.CONTEXT_TELEMETRY = (0, define_1.defineTelemetryEvents)({
60
90
  rendered_length: v4_1.z
61
91
  .number()
62
92
  .describe('Characters in the rendered block. Reviews the caps: a 95th percentile above 8,000 means the caps need new numbers'),
63
- surface: assistantSurface,
93
+ surface: schemas_1.assistantSurfaceSchema.describe('Always `aia`. An MCP client reads through a tool and never reports a turn, so it fires `Preferences read over MCP` instead'),
64
94
  injected_this_turn: v4_1.z
65
95
  .boolean()
66
96
  .describe('False when the text was unchanged and an earlier block in the same conversation still carries it. Shows how often re-injecting on every turn actually costs anything'),
@@ -74,44 +104,68 @@ exports.CONTEXT_TELEMETRY = (0, define_1.defineTelemetryEvents)({
74
104
  .describe('Input tokens of the turn, so the cost with and without the block is comparable'),
75
105
  }),
76
106
  },
107
+ PREFERENCES_READ_OVER_MCP: {
108
+ name: 'Preferences read over MCP',
109
+ description: 'An MCP client called `get_user_preferences`. Kept apart from `Preferences applied to a turn` because an MCP read is not a turn: n8n hands the text over and never learns whether the client applied it, so the latency and token columns of the turn event would stay empty. Fires on a successful read, including one that found nothing.',
110
+ properties: v4_1.z.object({
111
+ count: v4_1.z.number().describe('Preferences the read returned. 0 when none are saved'),
112
+ scope_types: v4_1.z.array(scopeType).describe('Distinct scopes the returned preferences covered'),
113
+ rendered_length: v4_1.z
114
+ .number()
115
+ .describe('Characters in the rendered block the client received. 0 when nothing is saved. Reviews the caps against the same number the turn event reports'),
116
+ project_scoped: v4_1.z
117
+ .boolean()
118
+ .describe('Whether the call named one project instead of reading every visible project'),
119
+ }),
120
+ },
77
121
  ASSISTANT_SAVED_PREFERENCE: {
78
122
  name: 'Assistant saved preference',
79
- description: 'An AI surface created or updated a preference on the user behalf, after the user accepted it. Kept apart from the UI events so an assistant write is never counted as a person writing in settings. CONTEXT-138 fires it.',
123
+ description: 'An AI surface created or updated a preference on the user behalf. The assistant writes first and the chat card is the confirmation, so this fires with the write, before the user has said anything. Kept apart from the UI events so an assistant write is never counted as a person writing in settings.',
80
124
  properties: v4_1.z.object({
81
- surface: assistantSurface,
125
+ surface: schemas_1.assistantSurfaceSchema,
82
126
  scope_type: scopeType,
83
127
  text_length: textLength,
84
128
  replaced_existing: v4_1.z
85
129
  .boolean()
86
- .describe('Whether the write updated an existing preference instead of adding one'),
130
+ .describe('Whether the write updated an existing preference instead of adding one. Only `update_user_preference` on MCP sets this true. The chat assistant has no update tool, so an `aia` row is always false'),
87
131
  }),
88
132
  },
89
133
  PREFERENCE_CONFIRMATION_SHOWN: {
90
134
  name: 'Preference confirmation shown',
91
- description: 'The assistant proposed a preference and the confirmation card was shown. Fires when the card appears, whatever the user does next. CONTEXT-138 fires it.',
135
+ description: 'The assistant saved a preference and the user was given the way to edit or undo it: the chat card, the MCP review form, or, on an MCP client without elicitation, the tool result that tells the client to relay the saved text and the settings link. Fires with the write, whatever the user does next.',
92
136
  properties: v4_1.z.object({
93
- surface: assistantSurface,
137
+ surface: schemas_1.assistantSurfaceSchema,
94
138
  scope_type: scopeType.describe('Scope the assistant offered'),
95
139
  text_length: textLength,
96
140
  }),
97
141
  },
142
+ USER_SAW_PREFERENCE_CARD: {
143
+ name: 'User saw preference card',
144
+ description: 'The preference card rendered in the chat thread. `Preference confirmation shown` fires with the write, so it counts confirmations offered, not confirmations seen. The gap between the two is a write whose card never reached the screen, which an MCP client without a review form always produces.',
145
+ properties: v4_1.z.object({
146
+ scope_type: scopeType.describe('Scope the card names at render time'),
147
+ state: v4_1.z
148
+ .enum(['saved', 'edited', 'undone'])
149
+ .describe('State the card rendered in, so a re-render after an edit is not read as a new write'),
150
+ }),
151
+ },
98
152
  PREFERENCE_CONFIRMATION_RESOLVED: {
99
153
  name: 'Preference confirmation resolved',
100
- description: 'The user answered a preference confirmation. A high `rejected` share means the assistant proposes the wrong preferences, and no other number shows that. CONTEXT-138 fires it.',
154
+ description: 'How a preference the assistant saved was settled. `accepted` fires with the write itself: the assistant writes first and silence is agreement, so it is not a user answer. `accepted_after_edit` and `rejected` are the explicit user actions, and either one supersedes the `accepted` already recorded for the same preference: read the last outcome for a preference, not the count of them. A high share of edits and removals means the assistant saves the wrong preferences, and no other number shows that.',
101
155
  properties: v4_1.z.object({
102
- surface: assistantSurface,
156
+ surface: schemas_1.assistantSurfaceSchema,
103
157
  outcome: v4_1.z
104
158
  .enum(['accepted', 'accepted_after_edit', 'rejected'])
105
- .describe('`accepted_after_edit` means the user changed the text before accepting'),
159
+ .describe('`accepted` is implicit, fired with the write. `accepted_after_edit` means the user changed the text from the card or the MCP review form. `rejected` means the user took the write back: Undo on the card, Decline on the MCP review form, or the MCP undo tool. The same removal also fires `User deleted preferences` with source `rejected`'),
106
160
  scope_type: scopeType.describe('Scope the preference was saved with, or the offered scope on a rejection'),
107
161
  text_length: textLength.describe('Character count of the text the user accepted or rejected'),
108
162
  }),
109
163
  },
110
164
  PREFERENCE_SCOPE_ACCEPTED: {
111
165
  name: 'Preference scope accepted',
112
- description: 'The scope the user accepted against the scope the assistant offered. Shows whether the assistant reads the difference between a personal habit and a team rule. Fires only on an accepted write. CONTEXT-138 and the scope ticket fire it.',
166
+ description: 'The scope the user accepted against the scope offered. An accepted write from the assistant reports `user` for both, because the tool writes only `user`. A later move reports the scope the row left as `offered_scope`, so `user` appears there only on the first move off the default. Fires on an accepted assistant write, on every move from the chat card, and on a move from MCP: the review form, or `update_user_preference` with a scope.',
113
167
  properties: v4_1.z.object({
114
- surface: assistantSurface,
168
+ surface: schemas_1.assistantSurfaceSchema,
115
169
  offered_scope: scopeType,
116
170
  accepted_scope: scopeType,
117
171
  scope_changed: v4_1.z.boolean().describe('Whether the user moved the write to another scope'),
@@ -119,9 +173,9 @@ exports.CONTEXT_TELEMETRY = (0, define_1.defineTelemetryEvents)({
119
173
  },
120
174
  PREFERENCE_WRITE_REJECTED: {
121
175
  name: 'Preference write rejected',
122
- description: 'A preference write was refused before it reached the database. Separates a rule the code applied from a user saying no, which is `Preference confirmation resolved`. CONTEXT-138 fires it.',
176
+ description: 'A preference write was refused before it reached the database. Separates a rule the code applied from a user saying no, which is `Preference confirmation resolved`.',
123
177
  properties: v4_1.z.object({
124
- surface,
178
+ surface: surfaceType,
125
179
  reason: v4_1.z
126
180
  .enum([
127
181
  'too_long',
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/events/context.ts"],"names":[],"mappings":";;;AAAA,+BAA2B;AAE3B,sCAAkD;AAGlD,MAAM,SAAS,GAAG,MAAC;KACjB,IAAI,CAAC,CAAC,MAAM,EAAE,SAAS,EAAE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AAQ,CAAC,2DAA2D,CAAC;SAC7F,CAAC;KACF;IAED,yBAAyB,EAAE;QAC1B,IAAI,EAAE,2BAA2B;QACjC,WAAW,EACV,sbAAsb;QACvb,UAAU,EAAE,MAAC,CAAC,MAAM,CAAC;YACpB,OAAO,EAAE,gCAAsB;YAC/B,aAAa,EAAE,SAAS;YACxB,cAAc,EAAE,SAAS;YACzB,aAAa,EAAE,MAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,mDAAmD,CAAC;SACxF,CAAC;KACF;IAED,yBAAyB,EAAE;QAC1B,IAAI,EAAE,2BAA2B;QACjC,WAAW,EACV,sKAAsK;QACvK,UAAU,EAAE,MAAC,CAAC,MAAM,CAAC;YACpB,OAAO,EAAE,WAAW;YACpB,MAAM,EAAE,MAAC;iBACP,IAAI,CAAC;gBACL,UAAU;gBACV,YAAY;gBACZ,WAAW;gBACX,eAAe;gBACf,kBAAkB;gBAClB,QAAQ;aACR,CAAC;iBACD,QAAQ,CACR,8LAA8L,CAC9L;YACF,UAAU,EAAE,SAAS,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,6CAA6C,CAAC;YACxF,WAAW,EAAE,UAAU,CAAC,QAAQ,EAAE;SAClC,CAAC;KACF;CACD,CAAC,CAAC"}
@@ -1,5 +1,16 @@
1
1
  import { z } from 'zod/v4';
2
2
  export declare const CREDENTIALS_TELEMETRY: {
3
+ readonly USER_VIEWED_GATEWAY_CREDITS_CREDENTIAL_ERROR_NUDGE: {
4
+ readonly name: "User viewed Gateway credits credential error nudge";
5
+ readonly description: "The credential modal showed a Gateway credits suggestion after a failed credential test for an eligible workflow node.";
6
+ readonly properties: z.ZodObject<{
7
+ credential_type: z.ZodString;
8
+ node_type: z.ZodString;
9
+ workflow_id: z.ZodOptional<z.ZodString>;
10
+ }, z.core.$strip>;
11
+ } & import("../define").TelemetryEventInput & {
12
+ readonly getValidationError: (properties: unknown) => string | null;
13
+ };
3
14
  readonly USER_CREATED_CREDENTIALS: {
4
15
  readonly name: "User created credentials";
5
16
  readonly description: "A credential was created. The server sets source to backend and reports description metadata. Existing editor events omit these properties. Description text is never included.";
@@ -29,13 +40,13 @@ export declare const CREDENTIALS_TELEMETRY: {
29
40
  readonly name: "User updated credentials";
30
41
  readonly description: "The server updated a credential through the internal credential API. Description metadata comes from the saved record. Description text is never included.";
31
42
  readonly properties: z.ZodObject<{
32
- has_description: z.ZodBoolean;
33
- description_length: z.ZodNumber;
34
43
  user_id: z.ZodString;
35
44
  user_role: z.ZodOptional<z.ZodString>;
36
45
  credential_id: z.ZodString;
37
46
  credential_type: z.ZodString;
38
- source: z.ZodLiteral<"backend">;
47
+ source: z.ZodOptional<z.ZodLiteral<"backend">>;
48
+ has_description: z.ZodOptional<z.ZodBoolean>;
49
+ description_length: z.ZodOptional<z.ZodNumber>;
39
50
  is_private: z.ZodBoolean;
40
51
  uses_external_secrets: z.ZodBoolean;
41
52
  jwe_enabled: z.ZodBoolean;
@@ -13,6 +13,15 @@ const descriptionProperties = {
13
13
  .describe('Length of the trimmed, saved description in UTF-16 code units. Zero when absent.'),
14
14
  };
15
15
  exports.CREDENTIALS_TELEMETRY = (0, define_1.defineTelemetryEvents)({
16
+ USER_VIEWED_GATEWAY_CREDITS_CREDENTIAL_ERROR_NUDGE: {
17
+ name: 'User viewed Gateway credits credential error nudge',
18
+ description: 'The credential modal showed a Gateway credits suggestion after a failed credential test for an eligible workflow node.',
19
+ properties: v4_1.z.object({
20
+ credential_type: v4_1.z.string(),
21
+ node_type: v4_1.z.string(),
22
+ workflow_id: v4_1.z.string().optional(),
23
+ }),
24
+ },
16
25
  USER_CREATED_CREDENTIALS: {
17
26
  name: 'User created credentials',
18
27
  description: 'A credential was created. The server sets source to backend and reports description metadata. Existing editor events omit these properties. Description text is never included.',
@@ -47,8 +56,9 @@ exports.CREDENTIALS_TELEMETRY = (0, define_1.defineTelemetryEvents)({
47
56
  user_role: v4_1.z.string().optional(),
48
57
  credential_id: v4_1.z.string(),
49
58
  credential_type: v4_1.z.string(),
50
- source: v4_1.z.literal('backend'),
51
- ...descriptionProperties,
59
+ source: v4_1.z.literal('backend').optional(),
60
+ has_description: descriptionProperties.has_description.optional(),
61
+ description_length: descriptionProperties.description_length.optional(),
52
62
  is_private: v4_1.z.boolean(),
53
63
  uses_external_secrets: v4_1.z.boolean(),
54
64
  jwe_enabled: v4_1.z.boolean(),
@@ -1 +1 @@
1
- {"version":3,"file":"credentials.js","sourceRoot":"","sources":["../../src/events/credentials.ts"],"names":[],"mappings":";;;AAAA,+BAA2B;AAE3B,sCAAkD;AAClD,0DAA+D;AAE/D,MAAM,qBAAqB,GAAG;IAC7B,eAAe,EAAE,MAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,0DAA0D,CAAC;IACjG,kBAAkB,EAAE,MAAC;SACnB,MAAM,EAAE;SACR,GAAG,EAAE;SACL,WAAW,EAAE;SACb,QAAQ,CAAC,kFAAkF,CAAC;CAC9F,CAAC;AAEW,QAAA,qBAAqB,GAAG,IAAA,8BAAqB,EAAC;IAC1D,wBAAwB,EAAE;QACzB,IAAI,EAAE,0BAA0B;QAChC,WAAW,EACV,iLAAiL;QAClL,UAAU,EAAE,MAAC,CAAC,MAAM,CAAC;YACpB,aAAa,EAAE,MAAC,CAAC,MAAM,EAAE;YACzB,eAAe,EAAE,MAAC,CAAC,MAAM,EAAE;YAC3B,MAAM,EAAE,MAAC;iBACP,OAAO,CAAC,SAAS,CAAC;iBAClB,QAAQ,EAAE;iBACV,QAAQ,CAAC,oDAAoD,CAAC;YAChE,UAAU,EAAE,MAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,yCAAyC,CAAC;YACtF,eAAe,EAAE,qBAAqB,CAAC,eAAe,CAAC,QAAQ,EAAE;YACjE,kBAAkB,EAAE,qBAAqB,CAAC,kBAAkB,CAAC,QAAQ,EAAE;YACvE,OAAO,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;YAC9B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CAAC,MAAM,EAAE;YAC3B,aAAa,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;YACpC,MAAM,EAAE,MAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;YACvE,aAAa,EAAE,MAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;SACpD,CAAC;KACF;IACD,sBAAsB,EAAE;QACvB,IAAI,EAAE,wBAAwB;QAC9B,WAAW,EACV,0VAA0V;QAC3V,UAAU,EAAE,MAAC,CAAC,MAAM,CAAC;YACpB,OAAO,EAAE,MAAC,CAAC,MAAM,EAAE;YACnB,aAAa,EAAE,MAAC,CAAC,MAAM,EAAE;YACzB,OAAO,EAAE,MAAC;iBACR,IAAI,CAAC,CAAC,UAAU,EAAE,UAAU,EAAE,YAAY,CAAC,CAAC;iBAC5C,QAAQ,CACR,wPAAwP,CACxP;SACF,CAAC;KACF;CACD,CAAC,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod/v4';
2
+ export declare const ASSISTANT_MENTION_QUERY_TEXT_MAX_LENGTH = 100;
2
3
  export declare const INSTANCE_AI_TELEMETRY: {
3
4
  readonly SETUP_PANEL_STATE_OBSERVED: {
4
5
  readonly name: "AI Assistant setup panel state observed";
@@ -322,8 +323,15 @@ export declare const INSTANCE_AI_TELEMETRY: {
322
323
  };
323
324
  readonly USER_RECEIVED_AI_ASSISTANT_RESPONSE: {
324
325
  readonly name: "User received AI Assistant response";
325
- 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.";
326
+ 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. Repeats the mention and attachment counts of the message that started the run, so outcome cuts by context need no join back to \"User sent builder message\".";
326
327
  readonly properties: z.ZodObject<{
328
+ mention_counts: z.ZodObject<{
329
+ total: z.ZodNumber;
330
+ workflow: z.ZodNumber;
331
+ node: z.ZodNumber;
332
+ group: z.ZodNumber;
333
+ }, z.core.$strip>;
334
+ attachment_count: z.ZodNumber;
327
335
  instance_id: z.ZodString;
328
336
  thread_id: z.ZodString;
329
337
  run_id: z.ZodString;
@@ -343,6 +351,7 @@ export declare const INSTANCE_AI_TELEMETRY: {
343
351
  credentials_list: "credentials_list";
344
352
  evals: "evals";
345
353
  node_error_view: "node_error_view";
354
+ onboarding: "onboarding";
346
355
  playwright: "playwright";
347
356
  "template-view": "template-view";
348
357
  unknown: "unknown";
@@ -563,6 +572,108 @@ export declare const INSTANCE_AI_TELEMETRY: {
563
572
  } & import("../define").TelemetryEventInput & {
564
573
  readonly getValidationError: (properties: unknown) => string | null;
565
574
  };
575
+ readonly USER_OPENED_AI_ASSISTANT_MENTION_PICKER: {
576
+ readonly name: "User opened AI Assistant mention picker";
577
+ readonly description: "The user opened the n8n Assistant mention picker by typing an at sign or selecting the composer button. Every open ends in exactly one \"User selected AI Assistant mention\" or one \"User dismissed AI Assistant mention picker\", so the two together give the pick rate per open.";
578
+ readonly properties: z.ZodObject<{
579
+ thread_id: z.ZodNullable<z.ZodString>;
580
+ source: z.ZodEnum<{
581
+ button: "button";
582
+ typed: "typed";
583
+ }>;
584
+ }, z.core.$strip>;
585
+ } & import("../define").TelemetryEventInput & {
586
+ readonly getValidationError: (properties: unknown) => string | null;
587
+ };
588
+ readonly USER_DISMISSED_AI_ASSISTANT_MENTION_PICKER: {
589
+ readonly name: "User dismissed AI Assistant mention picker";
590
+ readonly description: "The n8n Assistant mention picker closed without a selection. The list properties describe what was on screen at that moment: a search with result_count 0 is a resource the user could not find, a non-zero ambiguous_result_count is a list the user could not tell apart. Carries interaction metadata but no query text or resource names; the query text of an empty search is on \"User searched AI Assistant mentions without results\".";
591
+ readonly properties: z.ZodObject<{
592
+ thread_id: z.ZodNullable<z.ZodString>;
593
+ source: z.ZodEnum<{
594
+ button: "button";
595
+ typed: "typed";
596
+ }>;
597
+ reason: z.ZodEnum<{
598
+ closed_menu: "closed_menu";
599
+ deleted_trigger: "deleted_trigger";
600
+ moved_caret: "moved_caret";
601
+ unavailable: "unavailable";
602
+ }>;
603
+ mode: z.ZodEnum<{
604
+ browse: "browse";
605
+ search: "search";
606
+ }>;
607
+ query_length: z.ZodNumber;
608
+ result_count: z.ZodNumber;
609
+ ambiguous_result_count: z.ZodNumber;
610
+ submenu_open_count: z.ZodNumber;
611
+ }, z.core.$strip>;
612
+ } & import("../define").TelemetryEventInput & {
613
+ readonly getValidationError: (properties: unknown) => string | null;
614
+ };
615
+ readonly USER_SEARCHED_AI_ASSISTANT_MENTIONS_WITHOUT_RESULTS: {
616
+ readonly name: "User searched AI Assistant mentions without results";
617
+ readonly description: "The n8n Assistant mention picker showed its empty state for a search query the user let settle for about a second, or closed the picker on. Fires once per distinct settled query within one picker open, so typing straight through a prefix chain like \"S\", \"Sl\", \"Slack\" reports \"Slack\" once. The one mention event that carries the query text, to learn what users try to mention and cannot.";
618
+ readonly properties: z.ZodObject<{
619
+ thread_id: z.ZodNullable<z.ZodString>;
620
+ source: z.ZodEnum<{
621
+ button: "button";
622
+ typed: "typed";
623
+ }>;
624
+ query: z.ZodString;
625
+ query_length: z.ZodNumber;
626
+ matched_node_type: z.ZodNullable<z.ZodString>;
627
+ artifact_count: z.ZodNumber;
628
+ }, z.core.$strip>;
629
+ } & import("../define").TelemetryEventInput & {
630
+ readonly getValidationError: (properties: unknown) => string | null;
631
+ };
632
+ readonly USER_SELECTED_AI_ASSISTANT_MENTION: {
633
+ readonly name: "User selected AI Assistant mention";
634
+ readonly description: "The user selected a workflow, node, or canvas group from the n8n Assistant mention picker. A pick of a mention that is already staged also counts, so every open ends in this event or in \"User dismissed AI Assistant mention picker\". The event contains interaction metadata but no resource names or IDs.";
635
+ readonly properties: z.ZodObject<{
636
+ thread_id: z.ZodNullable<z.ZodString>;
637
+ kind: z.ZodEnum<{
638
+ group: "group";
639
+ node: "node";
640
+ workflow: "workflow";
641
+ }>;
642
+ mode: z.ZodEnum<{
643
+ browse: "browse";
644
+ search: "search";
645
+ }>;
646
+ source: z.ZodEnum<{
647
+ artifacts: "artifacts";
648
+ workflows: "workflows";
649
+ }>;
650
+ result_position: z.ZodNumber;
651
+ query_length: z.ZodNumber;
652
+ already_artifact: z.ZodBoolean;
653
+ artifact_origin: z.ZodNullable<z.ZodEnum<{
654
+ attached: "attached";
655
+ built: "built";
656
+ fetched: "fetched";
657
+ mentioned: "mentioned";
658
+ }>>;
659
+ }, z.core.$strip>;
660
+ } & import("../define").TelemetryEventInput & {
661
+ readonly getValidationError: (properties: unknown) => string | null;
662
+ };
663
+ readonly USER_REMOVED_AI_ASSISTANT_MENTION: {
664
+ readonly name: "User removed AI Assistant mention";
665
+ readonly description: "The user removed workflow, node, or canvas group context that they added through the n8n Assistant mention picker.";
666
+ readonly properties: z.ZodObject<{
667
+ thread_id: z.ZodNullable<z.ZodString>;
668
+ kind: z.ZodEnum<{
669
+ group: "group";
670
+ node: "node";
671
+ workflow: "workflow";
672
+ }>;
673
+ }, z.core.$strip>;
674
+ } & import("../define").TelemetryEventInput & {
675
+ readonly getValidationError: (properties: unknown) => string | null;
676
+ };
566
677
  readonly USER_SENT_BUILDER_MESSAGE: {
567
678
  readonly name: "User sent builder message";
568
679
  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.";
@@ -576,6 +687,13 @@ export declare const INSTANCE_AI_TELEMETRY: {
576
687
  control: "control";
577
688
  variant: "variant";
578
689
  }>>;
690
+ mention_counts: z.ZodObject<{
691
+ total: z.ZodNumber;
692
+ workflow: z.ZodNumber;
693
+ node: z.ZodNumber;
694
+ group: z.ZodNumber;
695
+ }, z.core.$strip>;
696
+ attachment_count: z.ZodNumber;
579
697
  workflow_id: z.ZodOptional<z.ZodString>;
580
698
  pending_credential_count: z.ZodOptional<z.ZodNumber>;
581
699
  pending_parameter_count: z.ZodOptional<z.ZodNumber>;
@@ -592,6 +710,7 @@ export declare const INSTANCE_AI_TELEMETRY: {
592
710
  credentials_list: "credentials_list";
593
711
  evals: "evals";
594
712
  node_error_view: "node_error_view";
713
+ onboarding: "onboarding";
595
714
  playwright: "playwright";
596
715
  "template-view": "template-view";
597
716
  unknown: "unknown";
@@ -651,4 +770,142 @@ export declare const INSTANCE_AI_TELEMETRY: {
651
770
  } & import("../define").TelemetryEventInput & {
652
771
  readonly getValidationError: (properties: unknown) => string | null;
653
772
  };
773
+ readonly USER_STARTED_AI_ASSISTANT_ONBOARDING: {
774
+ readonly name: "User started AI Assistant onboarding";
775
+ readonly description: "An onboarding thread was created: the user arrived from the n8n Cloud signup survey (/assistant?source=onboarding) or opened the onboarding by hand. Fires once per thread, from the backend, when the seeded greeting and question card are stored.";
776
+ readonly properties: z.ZodObject<{
777
+ user_id: z.ZodString;
778
+ thread_id: z.ZodString;
779
+ team: z.ZodNullable<z.ZodString>;
780
+ team_source: z.ZodNullable<z.ZodEnum<{
781
+ cloud: "cloud";
782
+ url: "url";
783
+ }>>;
784
+ }, z.core.$strip>;
785
+ } & import("../define").TelemetryEventInput & {
786
+ readonly getValidationError: (properties: unknown) => string | null;
787
+ };
788
+ readonly USER_ANSWERED_AI_ASSISTANT_ONBOARDING_CARD: {
789
+ readonly name: "User answered AI Assistant onboarding card";
790
+ readonly description: "The user settled the question card an onboarding thread opens with. Fires once per thread, from the backend, when the answers are stored. Carries the picked apps and the free text as typed.";
791
+ readonly properties: z.ZodObject<{
792
+ user_id: z.ZodString;
793
+ thread_id: z.ZodString;
794
+ team: z.ZodNullable<z.ZodString>;
795
+ team_source: z.ZodNullable<z.ZodEnum<{
796
+ card: "card";
797
+ cloud: "cloud";
798
+ url: "url";
799
+ }>>;
800
+ apps: z.ZodArray<z.ZodString>;
801
+ custom_text: z.ZodNullable<z.ZodString>;
802
+ }, z.core.$strip>;
803
+ } & import("../define").TelemetryEventInput & {
804
+ readonly getValidationError: (properties: unknown) => string | null;
805
+ };
806
+ readonly AI_ASSISTANT_ONBOARDING_ENDED: {
807
+ readonly name: "AI Assistant onboarding ended";
808
+ readonly description: "The onboarding flow of a thread ended and the normal chat came back. Fires once per thread, from the browser, on the first build, when the agent calls `leave-onboarding`, or when a run fails.";
809
+ readonly properties: z.ZodObject<{
810
+ thread_id: z.ZodString;
811
+ instance_id: z.ZodString;
812
+ outcome: z.ZodEnum<{
813
+ build: "build";
814
+ left: "left";
815
+ run_failed: "run_failed";
816
+ }>;
817
+ leave_reason: z.ZodNullable<z.ZodString>;
818
+ }, z.core.$strip>;
819
+ } & import("../define").TelemetryEventInput & {
820
+ readonly getValidationError: (properties: unknown) => string | null;
821
+ };
822
+ readonly INSTANCE_CONTEXT_TURN: {
823
+ readonly name: "Instance AI instance-context turn completed";
824
+ readonly description: "One context result per turn segment, including turns without a block. Group by run_id. Count distinct runs, sum segment tokens, and count a question if any segment asked one.";
825
+ readonly properties: z.ZodDiscriminatedUnion<[z.ZodObject<{
826
+ surface: z.ZodEnum<{
827
+ aia: "aia";
828
+ mcp: "mcp";
829
+ }>;
830
+ user_id: z.ZodString;
831
+ thread_id: z.ZodOptional<z.ZodString>;
832
+ run_id: z.ZodString;
833
+ segment: z.ZodEnum<{
834
+ resumed: "resumed";
835
+ suspended: "suspended";
836
+ whole: "whole";
837
+ }>;
838
+ instance_context_enabled: z.ZodBoolean;
839
+ node_usage_enabled: z.ZodBoolean;
840
+ context_depth: z.ZodNumber;
841
+ context_surfaces: z.ZodArray<z.ZodEnum<{
842
+ "activity-expand": "activity-expand";
843
+ "activity-list": "activity-list";
844
+ "node-usage": "node-usage";
845
+ "workflow-read": "workflow-read";
846
+ }>>;
847
+ asked_clarifying_question: z.ZodBoolean;
848
+ tool_calls: z.ZodNumber;
849
+ turn_prompt_tokens: z.ZodOptional<z.ZodNumber>;
850
+ turn_completion_tokens: z.ZodOptional<z.ZodNumber>;
851
+ turn_total_tokens: z.ZodOptional<z.ZodNumber>;
852
+ turn_cost_usd: z.ZodOptional<z.ZodNumber>;
853
+ status: z.ZodEnum<{
854
+ cancelled: "cancelled";
855
+ completed: "completed";
856
+ errored: "errored";
857
+ suspended: "suspended";
858
+ }>;
859
+ block_state: z.ZodLiteral<"absent">;
860
+ absence_reason: z.ZodEnum<{
861
+ disabled: "disabled";
862
+ empty: "empty";
863
+ failed: "failed";
864
+ "machine-follow-up": "machine-follow-up";
865
+ }>;
866
+ }, z.core.$strict>, z.ZodObject<{
867
+ surface: z.ZodEnum<{
868
+ aia: "aia";
869
+ mcp: "mcp";
870
+ }>;
871
+ user_id: z.ZodString;
872
+ thread_id: z.ZodOptional<z.ZodString>;
873
+ run_id: z.ZodString;
874
+ segment: z.ZodEnum<{
875
+ resumed: "resumed";
876
+ suspended: "suspended";
877
+ whole: "whole";
878
+ }>;
879
+ instance_context_enabled: z.ZodBoolean;
880
+ node_usage_enabled: z.ZodBoolean;
881
+ context_depth: z.ZodNumber;
882
+ context_surfaces: z.ZodArray<z.ZodEnum<{
883
+ "activity-expand": "activity-expand";
884
+ "activity-list": "activity-list";
885
+ "node-usage": "node-usage";
886
+ "workflow-read": "workflow-read";
887
+ }>>;
888
+ asked_clarifying_question: z.ZodBoolean;
889
+ tool_calls: z.ZodNumber;
890
+ turn_prompt_tokens: z.ZodOptional<z.ZodNumber>;
891
+ turn_completion_tokens: z.ZodOptional<z.ZodNumber>;
892
+ turn_total_tokens: z.ZodOptional<z.ZodNumber>;
893
+ turn_cost_usd: z.ZodOptional<z.ZodNumber>;
894
+ status: z.ZodEnum<{
895
+ cancelled: "cancelled";
896
+ completed: "completed";
897
+ errored: "errored";
898
+ suspended: "suspended";
899
+ }>;
900
+ block_state: z.ZodLiteral<"injected">;
901
+ block_is_update: z.ZodBoolean;
902
+ block_inventory_rows: z.ZodNumber;
903
+ block_event_rows: z.ZodNumber;
904
+ block_run_rows: z.ZodNumber;
905
+ block_chars: z.ZodNumber;
906
+ block_tokens_estimated: z.ZodNumber;
907
+ }, z.core.$strict>]>;
908
+ } & import("../define").TelemetryEventInput & {
909
+ readonly getValidationError: (properties: unknown) => string | null;
910
+ };
654
911
  };