@grafana/assistant 0.1.33 → 0.1.35

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 (129) hide show
  1. package/README.md +187 -33
  2. package/dist/components/button/OpenAssistantButton.d.ts +3 -3
  3. package/dist/components/button/OpenAssistantButton.d.ts.map +1 -1
  4. package/dist/components/button/OpenAssistantSplitButton.d.ts +2 -2
  5. package/dist/components/button/OpenAssistantSplitButton.d.ts.map +1 -1
  6. package/dist/components/button/QueryWithAssistantButton.d.ts +2 -2
  7. package/dist/components/button/QueryWithAssistantButton.d.ts.map +1 -1
  8. package/dist/components/input/AITextArea.d.ts +1 -1
  9. package/dist/components/input/AITextArea.d.ts.map +1 -1
  10. package/dist/components/input/AITextInput.d.ts +1 -1
  11. package/dist/components/input/AITextInput.d.ts.map +1 -1
  12. package/dist/components/input/useAIGeneration.d.ts.map +1 -1
  13. package/dist/components/prompt-card/AssistantPromptCard.d.ts +2 -2
  14. package/dist/components/prompt-card/AssistantPromptCard.d.ts.map +1 -1
  15. package/dist/context/agentSkill.d.ts +69 -0
  16. package/dist/context/agentSkill.d.ts.map +1 -0
  17. package/dist/context/base.d.ts.map +1 -1
  18. package/dist/context/chat.d.ts.map +1 -1
  19. package/dist/context/component.d.ts.map +1 -1
  20. package/dist/context/dashboard.d.ts.map +1 -1
  21. package/dist/context/datasource.d.ts.map +1 -1
  22. package/dist/context/entity.d.ts.map +1 -1
  23. package/dist/context/factory.d.ts.map +1 -1
  24. package/dist/context/index.d.ts +1 -0
  25. package/dist/context/index.d.ts.map +1 -1
  26. package/dist/context/label.d.ts.map +1 -1
  27. package/dist/context/page.d.ts.map +1 -1
  28. package/dist/context/skill.d.ts.map +1 -1
  29. package/dist/context/types.d.ts +15 -1
  30. package/dist/context/types.d.ts.map +1 -1
  31. package/dist/esm/components/button/OpenAssistantButton.js +2 -2
  32. package/dist/esm/components/button/OpenAssistantSplitButton.js +1 -0
  33. package/dist/esm/components/button/OpenAssistantSplitButton.js.map +1 -1
  34. package/dist/esm/components/input/useAIGeneration.js +14 -1
  35. package/dist/esm/components/input/useAIGeneration.js.map +1 -1
  36. package/dist/esm/components/prompt-card/AssistantPromptCard.js.map +1 -1
  37. package/dist/esm/context/agentSkill.js +70 -0
  38. package/dist/esm/context/agentSkill.js.map +1 -0
  39. package/dist/esm/context/base.js.map +1 -1
  40. package/dist/esm/context/chat.js +1 -0
  41. package/dist/esm/context/chat.js.map +1 -1
  42. package/dist/esm/context/component.js.map +1 -1
  43. package/dist/esm/context/factory.js +6 -4
  44. package/dist/esm/context/factory.js.map +1 -1
  45. package/dist/esm/context/index.js +1 -0
  46. package/dist/esm/context/index.js.map +1 -1
  47. package/dist/esm/context/page.js.map +1 -1
  48. package/dist/esm/context/questions.js +20 -26
  49. package/dist/esm/context/questions.js.map +1 -1
  50. package/dist/esm/extension/extension.js +8 -9
  51. package/dist/esm/extension/extension.js.map +1 -1
  52. package/dist/esm/extension/index.js +2 -1
  53. package/dist/esm/extension/index.js.map +1 -1
  54. package/dist/esm/extension/suggestionContexts.js +35 -0
  55. package/dist/esm/extension/suggestionContexts.js.map +1 -0
  56. package/dist/esm/index.js +3 -1
  57. package/dist/esm/index.js.map +1 -1
  58. package/dist/esm/inline/index.js.map +1 -1
  59. package/dist/esm/inline/inlineAssistant.js +1 -1
  60. package/dist/esm/inline/inlineAssistant.js.map +1 -1
  61. package/dist/esm/inline/useInlineAssistant.js +8 -3
  62. package/dist/esm/inline/useInlineAssistant.js.map +1 -1
  63. package/dist/esm/investigations/api.gen.js +6 -0
  64. package/dist/esm/investigations/api.gen.js.map +1 -0
  65. package/dist/esm/investigations/client.js +76 -0
  66. package/dist/esm/investigations/client.js.map +1 -0
  67. package/dist/esm/investigations/index.js +3 -0
  68. package/dist/esm/investigations/index.js.map +1 -0
  69. package/dist/esm/investigations/observe.js +204 -0
  70. package/dist/esm/investigations/observe.js.map +1 -0
  71. package/dist/esm/investigations/types.js +2 -0
  72. package/dist/esm/investigations/types.js.map +1 -0
  73. package/dist/esm/k6.js.map +1 -1
  74. package/dist/esm/lens/investigationLens.js +1 -1
  75. package/dist/esm/lens/investigationLens.js.map +1 -1
  76. package/dist/esm/lens/useInvestigationThroughLens.js +3 -1
  77. package/dist/esm/lens/useInvestigationThroughLens.js.map +1 -1
  78. package/dist/esm/limits/index.js +1 -1
  79. package/dist/esm/limits/index.js.map +1 -1
  80. package/dist/esm/pathfinder.js +41 -0
  81. package/dist/esm/pathfinder.js.map +1 -0
  82. package/dist/esm/sidebar.js +40 -20
  83. package/dist/esm/sidebar.js.map +1 -1
  84. package/dist/esm/terms/index.js +43 -5
  85. package/dist/esm/terms/index.js.map +1 -1
  86. package/dist/esm/tools/toolFactory.js.map +1 -1
  87. package/dist/esm/utils/errorHandling.js.map +1 -1
  88. package/dist/esm/utils/theme.js +11 -1
  89. package/dist/esm/utils/theme.js.map +1 -1
  90. package/dist/extension/extension.d.ts +243 -90
  91. package/dist/extension/extension.d.ts.map +1 -1
  92. package/dist/extension/index.d.ts +2 -1
  93. package/dist/extension/index.d.ts.map +1 -1
  94. package/dist/extension/suggestionContexts.d.ts +36 -0
  95. package/dist/extension/suggestionContexts.d.ts.map +1 -0
  96. package/dist/index.d.ts +3 -1
  97. package/dist/index.d.ts.map +1 -1
  98. package/dist/index.js +1 -1
  99. package/dist/index.js.map +1 -1
  100. package/dist/inline/index.d.ts +1 -1
  101. package/dist/inline/index.d.ts.map +1 -1
  102. package/dist/inline/inlineAssistant.d.ts +19 -6
  103. package/dist/inline/inlineAssistant.d.ts.map +1 -1
  104. package/dist/inline/useInlineAssistant.d.ts +5 -1
  105. package/dist/inline/useInlineAssistant.d.ts.map +1 -1
  106. package/dist/investigations/api.gen.d.ts +1872 -0
  107. package/dist/investigations/api.gen.d.ts.map +1 -0
  108. package/dist/investigations/client.d.ts +8 -0
  109. package/dist/investigations/client.d.ts.map +1 -0
  110. package/dist/investigations/index.d.ts +5 -0
  111. package/dist/investigations/index.d.ts.map +1 -0
  112. package/dist/investigations/observe.d.ts +10 -0
  113. package/dist/investigations/observe.d.ts.map +1 -0
  114. package/dist/investigations/types.d.ts +26 -0
  115. package/dist/investigations/types.d.ts.map +1 -0
  116. package/dist/lens/investigationLens.d.ts +0 -5
  117. package/dist/lens/investigationLens.d.ts.map +1 -1
  118. package/dist/lens/useInvestigationThroughLens.d.ts.map +1 -1
  119. package/dist/pathfinder.d.ts +41 -0
  120. package/dist/pathfinder.d.ts.map +1 -0
  121. package/dist/sidebar.d.ts +15 -0
  122. package/dist/sidebar.d.ts.map +1 -1
  123. package/dist/terms/index.d.ts +8 -0
  124. package/dist/terms/index.d.ts.map +1 -1
  125. package/dist/terms/settings.gen.d.ts +565 -50
  126. package/dist/terms/settings.gen.d.ts.map +1 -1
  127. package/dist/tools/types.d.ts +3 -3
  128. package/dist/utils/theme.d.ts.map +1 -1
  129. package/package.json +21 -18
@@ -1,3 +1,4 @@
1
+ import type { SuggestionContext } from './suggestionContexts';
1
2
  import type { PluginExtensionAddedFunctionConfig } from '@grafana/data';
2
3
  import type { ComponentType, ReactNode } from 'react';
3
4
  /**
@@ -12,10 +13,11 @@ import type { ComponentType, ReactNode } from 'react';
12
13
  */
13
14
  export declare const ASSISTANT_EXTENSION_POINT = "grafana-assistant-app/extension/v1";
14
15
  /**
15
- * Props passed to a `tool-card` chit component registered via {@link ChitContribution}.
16
+ * Props passed to a `tool-details` chit component registered via {@link ChitContribution}.
16
17
  *
17
18
  * These are the normalized props every tool row in the Assistant chat track receives; a
18
- * registered card renders in place of the generic tool card with the same information.
19
+ * registered component renders inside the expanded details area of the standard tool card,
20
+ * in place of the generic expanded content.
19
21
  *
20
22
  * @experimental This API is under active development and may change in future releases.
21
23
  */
@@ -29,15 +31,46 @@ export interface ToolChitProps {
29
31
  /** Execution state of the tool call. */
30
32
  status: 'running' | 'success' | 'error';
31
33
  }
34
+ /** Read-only inputs from tool calls in the message containing an inline component. */
35
+ export interface InlineChitToolCall {
36
+ readonly toolCallId?: string;
37
+ readonly name: string;
38
+ /** Model-authored input; validate its shape before using it. */
39
+ readonly input: unknown;
40
+ }
41
+ export interface InlineChitTurn {
42
+ /** False also covers stopped turns and history; it does not imply success. */
43
+ readonly isStreaming: boolean;
44
+ readonly tools: readonly InlineChitToolCall[];
45
+ }
46
+ export interface InlineChitProps {
47
+ children?: ReactNode;
48
+ /** Host-supplied context, never taken from model-authored attributes. Absent on older hosts. */
49
+ turn?: InlineChitTurn;
50
+ /** Sanitized `name` attribute, useful for a plugin-defined filter or identifier. */
51
+ name?: string;
52
+ }
53
+ export declare const InlineChitDisplay: {
54
+ readonly Inline: 'inline';
55
+ readonly Block: 'block';
56
+ };
57
+ export type InlineChitDisplay = (typeof InlineChitDisplay)[keyof typeof InlineChitDisplay];
32
58
  /**
33
- * A contribution to the Assistant chat track ("chits"): either a rich card keyed by tool name,
34
- * or a widget detector that renders inline widgets from message text.
59
+ * A contribution to the Assistant chat track ("chits"): either an expanded-details renderer
60
+ * keyed by tool name, or a component rendered in place of a tag inside assistant text.
35
61
  *
36
- * - `tool-card`: renders in place of the generic tool card for the listed tool names. A plugin
37
- * may only register cards for tools it owns (tool names are namespaced by the tool pipeline
38
- * and checked against the contributing plugin id).
39
- * - `widget`: extends the Assistant's widget detector chain. Built-in detectors run first,
40
- * plugin detectors after; the first match wins.
62
+ * - `tool-details`: renders inside the expanded details area of the standard tool card for the
63
+ * listed tool names, replacing the generic expanded content (Query/Result). The compact tool
64
+ * row, its status, and the Allow/Deny confirmation flow are always built in — a plugin never
65
+ * replaces the tool row and never renders while a confirmation is pending. A plugin may only
66
+ * register details for tools it owns (tool names are namespaced by the tool pipeline and
67
+ * checked against the contributing plugin id).
68
+ * - `inline`: registers a component rendered in place of a custom tag inside assistant message
69
+ * text. The full tag name is the plugin id with non-alphanumerics collapsed to underscores,
70
+ * followed by an underscore and `name` — for example plugin `grafana-k6-app` with
71
+ * `name: 'result'` renders `<grafana_k6_app_result>…</grafana_k6_app_result>`. Tag children
72
+ * and allow-listed attributes are passed through as props, alongside host-owned turn context.
73
+ * Optional `prompt` guidance teaches the model when to emit the tag through chat context.
41
74
  *
42
75
  * Component and function references are the only non-JSON-serializable parts of a manifest —
43
76
  * refer to {@link AssistantExtensionManifest} for the serializability contract.
@@ -45,17 +78,23 @@ export interface ToolChitProps {
45
78
  * @experimental This API is under active development and may change in future releases.
46
79
  */
47
80
  export type ChitContribution = {
48
- kind: 'tool-card';
49
- /** Fully namespaced tool names this card renders for. Must be owned by the contributing plugin. */
81
+ kind: 'tool-details';
82
+ /** Fully namespaced tool names this details renderer applies to. Must be owned by the contributing plugin. */
50
83
  toolNames: string[];
51
- /** The card component, rendered inside a per-chit error boundary. */
84
+ /** The details component, rendered inside a per-chit error boundary. */
52
85
  component: ComponentType<ToolChitProps>;
53
86
  } | {
54
- kind: 'widget';
55
- /** Returns true when this widget should render for the given message text. */
56
- detect: (text: string, meta: unknown) => boolean;
57
- /** Renders the widget for a matched message. */
58
- render: (text: string, meta: unknown) => ReactNode;
87
+ kind: 'inline';
88
+ /** Plugin-local tag suffix: lowercase, `[a-z][a-z0-9]*`. Namespaced by the plugin id into the full tag name. */
89
+ name: string;
90
+ /** Optional component usage guidance (up to 4096 UTF-8 bytes), sent as attributed chat context, not a system prompt or mode. */
91
+ prompt?: string;
92
+ /** A childless marker. Recover saved bare/backticked opening tags and suppress identical duplicates outside code. */
93
+ selfClosing?: boolean;
94
+ /** Defaults to inline. Block requires selfClosing: true and renders below the message text, outside Markdown paragraphs. */
95
+ display?: InlineChitDisplay;
96
+ /** Rendered in place of the tag, inside a per-chit error boundary. Receives tag children and allow-listed attributes as props. */
97
+ component: ComponentType<InlineChitProps>;
59
98
  };
60
99
  /**
61
100
  * The artifact file node handed to plugin artifact renderers and toolbars.
@@ -66,6 +105,17 @@ export type ChitContribution = {
66
105
  * @experimental This API is under active development and may change in future releases.
67
106
  */
68
107
  export interface AssistantArtifactNode {
108
+ /** Opaque host identity. Stable across chat draft edits/renames, scoped to the chat.
109
+ * Mounted resources use namespace/path identity. Absent on hosts without identity context.
110
+ * Never use this as authorization or parse its internal format.
111
+ */
112
+ id?: string;
113
+ /** Current, authorized live-resource metadata. Absent for chat-owned drafts. */
114
+ resource?: {
115
+ namespace: string;
116
+ revision?: string;
117
+ url?: string;
118
+ };
69
119
  /** File path of the artifact in the conversation's artifact filesystem. */
70
120
  path: string;
71
121
  /** The artifact kind extension, e.g. `.grafana-k6-app.test`. */
@@ -78,15 +128,13 @@ export interface AssistantArtifactNode {
78
128
  * timestamp — carries no wall-clock meaning.
79
129
  */
80
130
  revision: number;
131
+ /** Opaque backend revision for mounted files; use for cache keys when present. */
132
+ resourceRevision?: string;
81
133
  }
82
134
  /**
83
- * Read-only handle over the conversation's artifact filesystem, mirroring the host's read
84
- * surface.
85
- *
86
- * The handle spans the whole conversation: it includes other plugins' and built-in artifacts by
87
- * design — composition is the point. There is no write surface; artifact writes happen only
88
- * through the Assistant's validated `write_artifact` path. Renderers must treat this handle as
89
- * the only artifact-content source besides their own node.
135
+ * Read-only access to every artifact in the conversation, including built-in and other
136
+ * plugins' files. Use this handle and the supplied node for artifact content. Writes and
137
+ * edits go through the Assistant's validated `artifact_files` tool.
90
138
  *
91
139
  * @experimental This API is under active development and may change in future releases.
92
140
  */
@@ -103,11 +151,26 @@ export interface AssistantArtifactFs {
103
151
  *
104
152
  * @experimental This API is under active development and may change in future releases.
105
153
  */
154
+ /** Prefills the owning conversation. The user reviews and sends the turn. */
155
+ export type ArtifactRequestEdit = (input: {
156
+ message: string;
157
+ }) => void;
106
158
  export interface ArtifactRendererProps {
107
159
  /** The artifact node to render. */
108
160
  node: AssistantArtifactNode;
109
161
  /** Read-only handle over the conversation's artifact filesystem. */
110
162
  fs: AssistantArtifactFs;
163
+ /** Available in a conversation. Appends text and this artifact's path to the composer,
164
+ * preserves existing input, and focuses it. Never sends or writes automatically.
165
+ * Call only from an explicit user action. Hide edit actions when absent.
166
+ */
167
+ requestEdit?: ArtifactRequestEdit;
168
+ /** Normalized validation for this revision. Recheck readiness before saving or running. */
169
+ validation?: {
170
+ valid: boolean;
171
+ ready?: boolean;
172
+ issues: ArtifactValidationIssue[];
173
+ };
111
174
  }
112
175
  /**
113
176
  * Props passed to an optional plugin artifact toolbar.
@@ -119,6 +182,17 @@ export interface ArtifactToolbarProps {
119
182
  node: AssistantArtifactNode;
120
183
  /** Read-only handle over the conversation's artifact filesystem. */
121
184
  fs: AssistantArtifactFs;
185
+ /** Available in a conversation. Appends text and this artifact's path to the composer,
186
+ * preserves existing input, and focuses it. Never sends or writes automatically.
187
+ * Call only from an explicit user action. Hide edit actions when absent.
188
+ */
189
+ requestEdit?: ArtifactRequestEdit;
190
+ /** Normalized validation for this revision. Recheck readiness before saving or running. */
191
+ validation?: {
192
+ valid: boolean;
193
+ ready?: boolean;
194
+ issues: ArtifactValidationIssue[];
195
+ };
122
196
  }
123
197
  /**
124
198
  * A plugin-contributed artifact kind for the Assistant canvas.
@@ -133,34 +207,103 @@ export interface ArtifactToolbarProps {
133
207
  *
134
208
  * @experimental This API is under active development and may change in future releases.
135
209
  */
210
+ export interface ArtifactValidationIssue {
211
+ /** Field path owned by the plugin, for example steps[2].inputs.channel. */
212
+ path: string;
213
+ /** Actionable feedback. Never include credentials or other sensitive values. */
214
+ message: string;
215
+ }
216
+ /** valid controls draft writes/rendering. ready is advisory and never authorizes a save or run. */
217
+ export type ArtifactValidationResult = boolean | {
218
+ valid: boolean;
219
+ ready?: boolean;
220
+ issues: ArtifactValidationIssue[];
221
+ };
136
222
  export interface ArtifactKindContribution {
137
223
  /** Artifact extension in the form `.{pluginId}.{kind}` (exact plugin id), double-dot namespaced. */
138
224
  ext: `.${string}.${string}`;
139
225
  /** Human-readable label shown on artifact tabs and cards. */
140
226
  label: string;
141
- /** Icon name shown next to the label. */
227
+ /** Icon name. The current host displays a generic plugin icon instead. */
142
228
  icon: string;
143
229
  /**
144
- * Tab promotion order, ascending: LOWER values are promoted and rendered earlier. Built-in
145
- * kinds always occupy the lowest values (`.report` = 0, `.dashboard` = 1, `.query` = 2) and
146
- * cannot be jumped — the host clamps this value to non-negative and offsets it into a range
147
- * after every built-in, so it only orders your kinds relative to other plugin-contributed
148
- * kinds. Ties break by most recently updated artifact first; kinds with no live registration
149
- * sort last.
230
+ * Sort order among plugin kinds, ascending. The host clamps negative values to zero
231
+ * and places plugin kinds after built-ins. Ties use the most recently updated artifact.
150
232
  */
151
233
  tabPriority: number;
152
- /** Write-time content contract: returns true when `data` is valid for this kind. */
153
- validate(data: unknown): boolean;
234
+ /** Content validator. Accept with true or { valid: true, issues: [...] }. */
235
+ validate(data: unknown): ArtifactValidationResult;
236
+ /** Relative paths in this plugin's filesystem, discovered before authoring. */
237
+ instructionsPath?: string;
238
+ schemaPath?: string;
154
239
  /** Renders the artifact in the canvas. Receives the artifact node and a read-only conversation filesystem handle. */
155
240
  renderer: ComponentType<ArtifactRendererProps>;
156
241
  /** Optional toolbar rendered above the artifact. */
157
242
  toolbar?: ComponentType<ArtifactToolbarProps>;
158
- /** Optional one-line hint teaching the model how to write artifacts of this kind. */
243
+ /** Reserved hint. Accepted by the host but not currently sent to the model. */
159
244
  promptHint?: string;
160
245
  }
246
+ /** JSON or text stored by a plugin filesystem. Binary files are not supported. */
247
+ export type AssistantFileContent = null | boolean | number | string | AssistantFileContent[] | {
248
+ [key: string]: AssistantFileContent;
249
+ };
250
+ /** Paths are relative to the plugin mount, without a leading slash or traversal segments. */
251
+ export interface AssistantFilesystemFile {
252
+ path: string;
253
+ content: AssistantFileContent;
254
+ /** Opaque backend revision, used for conditional writes. */
255
+ revision: string;
256
+ title?: string;
257
+ /** Optional Grafana-local native page under /a/<registered-plugin-id>/. */
258
+ url?: string;
259
+ }
260
+ export interface AssistantFilesystemListInput {
261
+ /** Relative directory; empty string lists the mount root. */
262
+ path: string;
263
+ filter?: {
264
+ type?: string;
265
+ title?: string;
266
+ };
267
+ limit: number;
268
+ offset: number;
269
+ }
270
+ export interface AssistantFilesystemListResult {
271
+ /** Authorized files only, filtered then sorted by relative path before pagination. */
272
+ items: Array<{
273
+ path: string;
274
+ title?: string;
275
+ }>;
276
+ hasMore: boolean;
277
+ }
161
278
  /**
162
- * Environment conditions evaluated by the Assistant when deciding whether a contributed mode is
163
- * available. Unknown condition strings fail closed (the mode is hidden).
279
+ * A live filesystem mounted at /plugins/<registered-plugin-id>/ by the host.
280
+ * All callbacks run in the browser under the current caller. The owning backend must
281
+ * enforce authorization for every operation; chat access grants no resource permission.
282
+ * Paths and namespace are routing context, never authorization assertions.
283
+ * Missing/denied reads reject. No callback may return content from a different namespace.
284
+ * Keep callbacks stable and independent of `this`, like other manifest callbacks.
285
+ *
286
+ * Ordinary text/JSON files are tool-accessible. Files with the plugin's registered artifact
287
+ * extensions can also attach to the canvas. No content is reconstructed from chat inputs.
288
+ * @experimental
289
+ */
290
+ export interface AssistantFilesystemContribution {
291
+ /** Optional Markdown instructions exposed read-only at the mount's AGENT.md (max 32 KiB). */
292
+ agentGuide?: string;
293
+ read(namespace: string, path: string): Promise<AssistantFilesystemFile>;
294
+ list(namespace: string, input: AssistantFilesystemListInput): Promise<AssistantFilesystemListResult>;
295
+ /** Metadata only; undefined means missing or inaccessible. Other failures reject. */
296
+ metadata(namespace: string, path: string): Promise<{
297
+ title?: string;
298
+ } | undefined>;
299
+ /** Atomic create: assign and return a relative path; rejection means nothing was created. */
300
+ create?(namespace: string, content: AssistantFileContent): Promise<AssistantFilesystemFile>;
301
+ /** Update an existing file only, enforcing the supplied revision atomically in storage. */
302
+ write?(namespace: string, path: string, content: AssistantFileContent, revision: string): Promise<AssistantFilesystemFile>;
303
+ }
304
+ /**
305
+ * Reserved availability conditions for plugin modes.
306
+ * The current plugin-mode adapter does not apply these conditions.
164
307
  *
165
308
  * @experimental This API is under active development and may change in future releases.
166
309
  */
@@ -170,7 +313,10 @@ export type PromptContributionAvailability = 'not-oss' | 'not-trial';
170
313
  *
171
314
  * The contribution is exposed in the mode picker as `${pluginId}:${modeId}` and its prompt text
172
315
  * is always rendered inside an attributed `<plugin_contribution>` wrapper, subject to a
173
- * per-plugin byte budget and an assistant-side allowlist.
316
+ * 16 KiB UTF-8 body limit and an assistant-side allowlist.
317
+ *
318
+ * The current host applies modeId, label, description, compose, and prompt only. Other
319
+ * fields are accepted but not applied; don't use them to enforce tool or access restrictions.
174
320
  *
175
321
  * All fields are JSON-serializable — refer to {@link AssistantExtensionManifest} for the
176
322
  * serializability contract.
@@ -184,7 +330,7 @@ export interface PromptContribution {
184
330
  label: string;
185
331
  /** Short description of the mode shown in the mode picker. */
186
332
  description: string;
187
- /** One line describing when the Assistant should suggest this mode. */
333
+ /** Intended suggestion guidance. Required by the schema, but not currently applied by the host. */
188
334
  whenToUse: string;
189
335
  /**
190
336
  * How `prompt` composes with the base system prompt.
@@ -206,39 +352,27 @@ export interface PromptContribution {
206
352
  * {@link PromptContribution.compose}.
207
353
  */
208
354
  prompt: string;
209
- /** Optional hidden first message sent when the mode is selected on a fresh chat. */
355
+ /** Reserved first-message text. The current host does not send it. */
210
356
  initialMessage?: string;
211
- /**
212
- * Whether the mode can be switched to mid-conversation. Defaults to true. When false the mode
213
- * is entry-point only: listed on fresh chats and reachable via deep links, but hidden from the
214
- * picker mid-conversation and excluded from mode suggestions.
215
- */
357
+ /** Reserved switching preference. The current host does not apply it. */
216
358
  switchable?: boolean;
217
- /** Environment conditions evaluated by the Assistant; all must hold for the mode to show. */
359
+ /** Reserved availability conditions. The current host does not evaluate them for plugin modes. */
218
360
  availability?: PromptContributionAvailability[];
219
- /** Names of the plugin's own tools scoped exclusively to this mode. */
361
+ /** Reserved tool scoping. The current host does not restrict tools using this field. */
220
362
  modeToolNames?: string[];
221
- /** Optional icon name shown in the mode picker. */
363
+ /** Reserved icon name. The current host displays a generic plugin icon. */
222
364
  icon?: string;
223
- /** Optional feature state badge shown next to the mode label. */
365
+ /** Reserved badge. The current host does not apply it. */
224
366
  featureState?: 'preview' | 'experimental';
225
367
  }
226
368
  /**
227
- * A proposed first message shown on fresh chats (empty conversations) on the Assistant chat
228
- * surfaces, visibly attributed to the contributing plugin.
229
- *
230
- * Selecting a starter sends `message` as an ordinary, user-visible user message. Starters are
231
- * never auto-sent, never hidden, and never modify the system prompt — which is why they are part
232
- * of the v1 chat-content surface (master flag + per-plugin kill switch only; no allowlist, no
233
- * prompt-contributions flag). Contrast with {@link PromptContribution.initialMessage}, which is
234
- * hidden, auto-sent on mode selection, and ships behind the v2 prompt-contributions flag.
235
- *
236
- * Enforced bounds (entries beyond a cap are dropped whole by the Assistant): max 3 starters per
237
- * plugin, `message` at most 500 characters, `label` at most 80 characters.
369
+ * A proposed first message on empty Assistant chats, attributed to your plugin.
370
+ * Selecting it sends `message` as a visible user message. Requires the extensions master
371
+ * flag and an enabled plugin; no prompt flag or allowlist is needed.
238
372
  *
239
- * Starters are pure data (fully JSON-serializable), making them ideal for the future static
240
- * `plugin.json` transport — refer to {@link AssistantExtensionManifest} for the serializability
241
- * contract.
373
+ * The host keeps the first 3 valid entries. Over-length entries are dropped, not truncated.
374
+ * Use `contexts` to participate in route-relevant selection, or `provideQuestions`
375
+ * for suggestions tied to a page where your plugin runs.
242
376
  *
243
377
  * @experimental This API is under active development and may change in future releases.
244
378
  */
@@ -247,52 +381,71 @@ export interface AssistantStarter {
247
381
  label?: string;
248
382
  /** The user message sent, visibly and as-is, when the starter is selected. Max 500 characters. */
249
383
  message: string;
384
+ /** Eligible on any listed route context. Omitted: only this plugin's /a/<pluginId> routes.
385
+ * An empty list disables the starter. Eligible starters compete with built-in suggestions.
386
+ */
387
+ contexts?: readonly SuggestionContext[];
250
388
  }
251
389
  /**
252
- * The manifest a Grafana app plugin returns from its assistant extension function to contribute
253
- * chits, starters, artifact kinds, and prompt/mode variants to the Grafana Assistant.
390
+ * A plugin workflow with a read-only listing on the Assistant's Skills settings page.
391
+ * The catalog and loader that deliver content to the model are not implemented yet.
392
+ * Proposed activation requires trusted server integration and a supported runtime surface.
393
+ * Automatic discovery would also require a short author hint (`whenToUse`), not yet in this
394
+ * interface. Existing manifests remain valid and would be manual-only without a hint once
395
+ * manual activation ships; enabling the builtin runtime does not activate plugin registrations.
254
396
  *
255
- * Serializability contract: every field of the manifest is JSON-serializable **except**
256
- * component and function references (`ChitContribution.component` / `detect` / `render`,
257
- * `ArtifactKindContribution.validate` / `renderer` / `toolbar`). This constraint is deliberate:
258
- * it enables a future transport where the static halves of a manifest are declared in signed
259
- * `plugin.json` metadata and only component references are resolved at runtime.
397
+ * The host assigns the handle `plugin:{pluginId}:{id}` using the registered plugin ID.
398
+ * Plugin skills are not saved as tenant skills or indexed for search. Removing a
399
+ * registration removes its skills. The prompt flag and allowlist don't gate registration.
260
400
  *
261
- * Unknown fields and unknown contribution kinds are ignored by the Assistant, so manifests
262
- * produced by newer SDK versions degrade gracefully on older Assistant versions.
401
+ * The host keeps the first 5 valid, unique IDs and drops entries that exceed field limits.
402
+ *
403
+ * @experimental This API is under active development and may change in future releases.
404
+ */
405
+ export interface SkillContribution {
406
+ /** Plugin-local skill id: `[a-z][a-z0-9-]*`, max 64 characters. Namespaced by the plugin id into the catalog handle. */
407
+ id: string;
408
+ /** Nonblank title shown in settings. Max 80 characters. */
409
+ title: string;
410
+ /** One or two sentences describing what the skill does and when to use it. Max 500 characters. */
411
+ description: string;
412
+ /** Nonblank Markdown body. Model loading is not implemented yet. Max 32768 UTF-8 bytes. */
413
+ content: string;
414
+ }
415
+ /**
416
+ * Contributions from one Grafana app plugin to the Assistant sidebar and workspace.
417
+ * Register with {@link getAssistantExtensionConfig} and declare the matching target in
418
+ * `plugin.json`. Keep the manifest stable after registration.
419
+ *
420
+ * Fields must be JSON-serializable except components and callbacks (`component`,
421
+ * `validate`, `renderer`, `toolbar`, and filesystem callbacks). Unknown fields are ignored. Unknown contribution
422
+ * kinds and malformed entries are dropped; an unknown schemaVersion rejects the manifest.
263
423
  *
264
424
  * @experimental This API is under active development and may change in future releases.
265
425
  */
266
426
  export interface AssistantExtensionManifest {
267
427
  /** Manifest schema version. Always 1 for this SDK version. */
268
428
  schemaVersion: 1;
269
- /** Chat-track contributions: tool cards and widget detectors. */
429
+ /** Chat-track contributions: tool-details renderers and inline components. */
270
430
  chits?: ChitContribution[];
271
- /**
272
- * Proposed first messages offered on fresh chats, attributed to the plugin. Max 3.
273
- *
274
- * When to use which: use `provideQuestions` to suggest questions on pages YOUR plugin already
275
- * runs on (URL-scoped, page-context registry, requires your module to be loaded on that page,
276
- * unattributed); use manifest `starters` for proposed first messages in the Assistant's fresh
277
- * chats ANYWHERE (extension-point transport, loads your module on demand, plugin-attributed,
278
- * governed by the Assistant's per-plugin kill switch and caps, statically declarable in the
279
- * future). They intentionally share the same rendering surface and send path.
280
- */
431
+ /** Proposed first messages on empty chats, attributed to the plugin. Max 3 valid entries. */
281
432
  starters?: AssistantStarter[];
433
+ /** Plugin workflows listed in settings. Model loading is not implemented yet. Max 5 valid entries. */
434
+ skills?: SkillContribution[];
282
435
  /** Canvas artifact kinds. */
283
436
  artifactKinds?: ArtifactKindContribution[];
437
+ /** Optional persistent filesystem, mounted under the registering plugin ID. */
438
+ filesystem?: AssistantFilesystemContribution;
284
439
  /** Assistant mode / system prompt contributions. */
285
440
  promptContributions?: PromptContribution[];
286
441
  }
287
442
  /**
288
- * Builds the `AppPlugin.addFunction()` configuration that registers an assistant extension
289
- * manifest with the Grafana Assistant.
443
+ * Builds the function registration for {@link ASSISTANT_EXTENSION_POINT}.
444
+ * Also declare the target in `plugin.json` under `extensions.addedFunctions`. Use
445
+ * `preload: true` for Grafana 12.1 compatibility with function-only contributions.
290
446
  *
291
- * Purity contract: the registered function MUST be pure and stable — invoked any number of
292
- * times, it must return the same (deep-equal) manifest for the same environment. The Assistant
293
- * dedups deep-equal results; an unstable manifest churns downstream consumers and invalidates
294
- * prompt caching. Gate on your own feature flags *before* registering rather than returning a
295
- * varying manifest.
447
+ * The returned function reuses `manifest`. Don't mutate it after registration; define
448
+ * components and callbacks outside React renders so their references stay stable.
296
449
  *
297
450
  * @example
298
451
  * ```typescript
@@ -302,7 +455,7 @@ export interface AssistantExtensionManifest {
302
455
  * export const plugin = new AppPlugin().addFunction(
303
456
  * getAssistantExtensionConfig({
304
457
  * schemaVersion: 1,
305
- * chits: [{ kind: 'tool-card', toolNames: ['myplugin_run_check'], component: MyToolCard }],
458
+ * starters: [{ message: 'Help me review recent service errors in this stack.' }],
306
459
  * })
307
460
  * );
308
461
  * ```
@@ -1 +1 @@
1
- {"version":3,"file":"extension.d.ts","sourceRoot":"","sources":["../../src/extension/extension.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,eAAe,CAAC;AACxE,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtD;;;;;;;;;GASG;AACH,eAAO,MAAM,yBAAyB,uCAAuC,CAAC;AAE9E;;;;;;;GAOG;AACH,MAAM,WAAW,aAAa;IAC5B,8DAA8D;IAC9D,QAAQ,EAAE,MAAM,CAAC;IACjB,gDAAgD;IAChD,KAAK,EAAE,OAAO,CAAC;IACf,oFAAoF;IACpF,MAAM,EAAE,OAAO,CAAC;IAChB,wCAAwC;IACxC,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;CACzC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,gBAAgB,GACxB;IACE,IAAI,EAAE,WAAW,CAAC;IAClB,mGAAmG;IACnG,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,qEAAqE;IACrE,SAAS,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC;CACzC,GACD;IACE,IAAI,EAAE,QAAQ,CAAC;IACf,8EAA8E;IAC9E,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,KAAK,OAAO,CAAC;IACjD,gDAAgD;IAChD,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,KAAK,SAAS,CAAC;CACpD,CAAC;AAEN;;;;;;;G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AC9D,aAAa,EAAE,CAAC,CAAC;IACjB,8EAA8E;IAC9E,KAAK,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC3B,6FAA6F;IAC7F,QAAQ,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC9B,sGAAsG;IACtG,MAAM,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAC7B,6BAA6B;IAC7B,aAAa,CAAC,EAAE,wBAAwB,EAAE,CAAC;IAC3C,+EAA+E;IAC/E,UAAU,CAAC,EAAE,+BAA+B,CAAC;IAC7C,oDAAoD;IACpD,mBAAmB,CAAC,EAAE,kBAAkB,EAAE,CAAC;CAC5C;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,0BAA0B,GACnC,kCAAkC,CAAC,MAAM,0BAA0B,CAAC,CAQtE"}
@@ -1,2 +1,3 @@
1
- export { ASSISTANT_EXTENSION_POINT, getAssistantExtensionConfig, type ArtifactKindContribution, type AssistantArtifactFs, type ArtifactRendererProps, type ArtifactToolbarProps, type ChitContribution, type PromptContribution, type PromptContributionAvailability, type ToolChitProps, type AssistantArtifactNode, type AssistantExtensionManifest, type AssistantStarter, } from './extension';
1
+ export { ASSISTANT_EXTENSION_POINT, type AssistantFileContent, type AssistantFilesystemFile, type AssistantFilesystemListInput, type AssistantFilesystemListResult, type AssistantFilesystemContribution, getAssistantExtensionConfig, type ArtifactKindContribution, type ArtifactValidationIssue, type ArtifactValidationResult, type AssistantArtifactFs, type ArtifactRendererProps, type ArtifactRequestEdit, type ArtifactToolbarProps, type ChitContribution, type PromptContribution, type PromptContributionAvailability, type ToolChitProps, type InlineChitProps, InlineChitDisplay, type InlineChitTurn, type InlineChitToolCall, type AssistantArtifactNode, type AssistantExtensionManifest, type AssistantStarter, type SkillContribution, } from './extension';
2
+ export { SuggestionContext } from './suggestionContexts';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/extension/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EACzB,2BAA2B,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,8BAA8B,EACnC,KAAK,aAAa,EAClB,KAAK,qBAAqB,EAC1B,KAAK,0BAA0B,EAC/B,KAAK,gBAAgB,GACtB,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/extension/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EACzB,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,4BAA4B,EACjC,KAAK,6BAA6B,EAClC,KAAK,+BAA+B,EACpC,2BAA2B,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAC7B,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,8BAA8B,EACnC,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,iBAAiB,EACjB,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAC1B,KAAK,0BAA0B,EAC/B,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,GACvB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,36 @@
1
+ export declare const SuggestionContext: {
2
+ readonly Home: '/';
3
+ readonly CloudHome: '/a/cloud-home-app';
4
+ readonly Workspace: '/a/grafana-assistant-app/workspace';
5
+ readonly Dashboard: '/d';
6
+ readonly Dashboards: '/dashboards';
7
+ readonly Alerting: '/alerting';
8
+ readonly AlertRules: '/alerting/list';
9
+ readonly AlertRule: '/alerting/grafana/:uid/view';
10
+ readonly Notifications: '/alerting/notifications';
11
+ readonly Silences: '/alerting/silences';
12
+ readonly Connections: '/connections';
13
+ readonly DataSources: '/connections/datasources';
14
+ readonly Explore: '/explore';
15
+ readonly Drilldown: '/drilldown';
16
+ readonly Metrics: '/a/grafana-metricsdrilldown-app/drilldown';
17
+ readonly Logs: '/a/grafana-lokiexplore-app/explore';
18
+ readonly Traces: '/a/grafana-exploretraces-app';
19
+ readonly Profiles: '/a/grafana-pyroscope-app/explore';
20
+ readonly SQL: '/a/grafana-sqldrilldown-app/explore';
21
+ readonly Admin: '/admin';
22
+ readonly Users: '/admin/users';
23
+ readonly Organization: '/org';
24
+ readonly Teams: '/org/teams';
25
+ readonly ServiceAccounts: '/org/serviceaccounts';
26
+ readonly Notebooks: '/notebooks';
27
+ readonly Notebook: '/notebooks/:uid';
28
+ readonly NewNotebook: '/notebooks/new';
29
+ readonly Pages: '/a/grafana-assistant-app/pages';
30
+ readonly Page: '/a/grafana-assistant-app/pages/:id';
31
+ readonly PageTemplates: '/a/grafana-assistant-app/pages/templates';
32
+ readonly NewPage: '/a/grafana-assistant-app/pages/new';
33
+ readonly Costs: '/a/grafana-cmab-app';
34
+ };
35
+ export type SuggestionContext = (typeof SuggestionContext)[keyof typeof SuggestionContext];
36
+ //# sourceMappingURL=suggestionContexts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"suggestionContexts.d.ts","sourceRoot":"","sources":["../../src/extension/suggestionContexts.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB;aAC5B,IAAI,EAAE,GAAG;aACT,SAAS,EAAE,mBAAmB;aAC9B,SAAS,EAAE,oCAAoC;aAC/C,SAAS,EAAE,IAAI;aACf,UAAU,EAAE,aAAa;aACzB,QAAQ,EAAE,WAAW;aACrB,UAAU,EAAE,gBAAgB;aAC5B,SAAS,EAAE,6BAA6B;aACxC,aAAa,EAAE,yBAAyB;aACxC,QAAQ,EAAE,oBAAoB;aAC9B,WAAW,EAAE,cAAc;aAC3B,WAAW,EAAE,0BAA0B;aACvC,OAAO,EAAE,UAAU;aACnB,SAAS,EAAE,YAAY;aACvB,OAAO,EAAE,2CAA2C;aACpD,IAAI,EAAE,oCAAoC;aAC1C,MAAM,EAAE,8BAA8B;aACtC,QAAQ,EAAE,kCAAkC;aAC5C,GAAG,EAAE,qCAAqC;aAC1C,KAAK,EAAE,QAAQ;aACf,KAAK,EAAE,cAAc;aACrB,YAAY,EAAE,MAAM;aACpB,KAAK,EAAE,YAAY;aACnB,eAAe,EAAE,sBAAsB;aACvC,SAAS,EAAE,YAAY;aACvB,QAAQ,EAAE,iBAAiB;aAC3B,WAAW,EAAE,gBAAgB;aAC7B,KAAK,EAAE,gCAAgC;aACvC,IAAI,EAAE,oCAAoC;aAC1C,aAAa,EAAE,0CAA0C;aACzD,OAAO,EAAE,oCAAoC;aAC7C,KAAK,EAAE,qBAAqB;CACpB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { createAssistantContextItem, ChatContextItem, ComponentNodeData, DashboardNodeData, DatasourceNodeData, EntityNodeData, FolderNodeData, ItemDataType, LabelNameNodeData, LabelValueNodeData, SkillNodeData, StructuredNodeData, TreeNode, providePageContext, useProvidePageContext, PageContextRegistration, usePageContext, provideQuestions, useProvideQuestions, useQuestions, Question, QuestionRegistration, usePageComponents, provideComponents, ComponentImplementation, NamedComponents, } from './context/index';
1
+ export { createAssistantContextItem, AgentSkillNodeData, AgentSkillReference, agentSkillNodeId, ChatContextItem, ComponentNodeData, DashboardNodeData, DatasourceNodeData, EntityNodeData, FolderNodeData, ItemDataType, LabelNameNodeData, LabelValueNodeData, SkillNodeData, StructuredNodeData, TreeNode, providePageContext, useProvidePageContext, PageContextRegistration, usePageContext, provideQuestions, useProvideQuestions, useQuestions, Question, QuestionRegistration, usePageComponents, provideComponents, ComponentImplementation, NamedComponents, } from './context/index';
2
2
  export * from './functions';
3
3
  export * from './hook';
4
4
  export * from './plugin';
@@ -6,9 +6,11 @@ export * from './sidebar';
6
6
  export * from './components';
7
7
  export * from './inline';
8
8
  export * from './lens';
9
+ export * from './investigations';
9
10
  export * from './terms';
10
11
  export * from './tools';
11
12
  export * from './limits';
12
13
  export * from './k6';
14
+ export * from './pathfinder';
13
15
  export * from './extension';
14
16
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,EAC1B,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,EACb,kBAAkB,EAClB,QAAQ,EACR,kBAAkB,EAClB,qBAAqB,EACrB,uBAAuB,EACvB,cAAc,EACd,gBAAgB,EAChB,mBAAmB,EACnB,YAAY,EACZ,QAAQ,EACR,oBAAoB,EAEpB,iBAAiB,EACjB,iBAAiB,EACjB,uBAAuB,EACvB,eAAe,GAChB,MAAM,iBAAiB,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,MAAM,CAAC;AACrB,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,EAC1B,kBAAkB,EAClB,mBAAmB,EACnB,gB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