@grafana/assistant 0.1.34 → 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.
- package/README.md +186 -42
- package/dist/components/button/OpenAssistantButton.d.ts +3 -3
- package/dist/components/button/OpenAssistantButton.d.ts.map +1 -1
- package/dist/components/button/OpenAssistantSplitButton.d.ts +2 -2
- package/dist/components/button/OpenAssistantSplitButton.d.ts.map +1 -1
- package/dist/components/button/QueryWithAssistantButton.d.ts +2 -2
- package/dist/components/button/QueryWithAssistantButton.d.ts.map +1 -1
- package/dist/components/input/AITextArea.d.ts +1 -1
- package/dist/components/input/AITextArea.d.ts.map +1 -1
- package/dist/components/input/AITextInput.d.ts +1 -1
- package/dist/components/input/AITextInput.d.ts.map +1 -1
- package/dist/components/input/useAIGeneration.d.ts.map +1 -1
- package/dist/components/prompt-card/AssistantPromptCard.d.ts +2 -2
- package/dist/components/prompt-card/AssistantPromptCard.d.ts.map +1 -1
- package/dist/context/agentSkill.d.ts +69 -0
- package/dist/context/agentSkill.d.ts.map +1 -0
- package/dist/context/base.d.ts.map +1 -1
- package/dist/context/chat.d.ts.map +1 -1
- package/dist/context/component.d.ts.map +1 -1
- package/dist/context/dashboard.d.ts.map +1 -1
- package/dist/context/datasource.d.ts.map +1 -1
- package/dist/context/entity.d.ts.map +1 -1
- package/dist/context/factory.d.ts.map +1 -1
- package/dist/context/index.d.ts +1 -0
- package/dist/context/index.d.ts.map +1 -1
- package/dist/context/label.d.ts.map +1 -1
- package/dist/context/page.d.ts.map +1 -1
- package/dist/context/skill.d.ts.map +1 -1
- package/dist/context/types.d.ts +15 -1
- package/dist/context/types.d.ts.map +1 -1
- package/dist/esm/components/button/OpenAssistantButton.js +2 -2
- package/dist/esm/components/button/OpenAssistantSplitButton.js +1 -0
- package/dist/esm/components/button/OpenAssistantSplitButton.js.map +1 -1
- package/dist/esm/components/input/useAIGeneration.js +14 -1
- package/dist/esm/components/input/useAIGeneration.js.map +1 -1
- package/dist/esm/components/prompt-card/AssistantPromptCard.js.map +1 -1
- package/dist/esm/context/agentSkill.js +70 -0
- package/dist/esm/context/agentSkill.js.map +1 -0
- package/dist/esm/context/base.js.map +1 -1
- package/dist/esm/context/chat.js +1 -0
- package/dist/esm/context/chat.js.map +1 -1
- package/dist/esm/context/component.js.map +1 -1
- package/dist/esm/context/factory.js +6 -4
- package/dist/esm/context/factory.js.map +1 -1
- package/dist/esm/context/index.js +1 -0
- package/dist/esm/context/index.js.map +1 -1
- package/dist/esm/context/page.js.map +1 -1
- package/dist/esm/context/questions.js +20 -26
- package/dist/esm/context/questions.js.map +1 -1
- package/dist/esm/extension/extension.js +7 -8
- package/dist/esm/extension/extension.js.map +1 -1
- package/dist/esm/extension/index.js +2 -1
- package/dist/esm/extension/index.js.map +1 -1
- package/dist/esm/extension/suggestionContexts.js +35 -0
- package/dist/esm/extension/suggestionContexts.js.map +1 -0
- package/dist/esm/index.js +3 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/inline/index.js.map +1 -1
- package/dist/esm/inline/inlineAssistant.js +1 -1
- package/dist/esm/inline/inlineAssistant.js.map +1 -1
- package/dist/esm/inline/useInlineAssistant.js +8 -3
- package/dist/esm/inline/useInlineAssistant.js.map +1 -1
- package/dist/esm/investigations/api.gen.js +6 -0
- package/dist/esm/investigations/api.gen.js.map +1 -0
- package/dist/esm/investigations/client.js +76 -0
- package/dist/esm/investigations/client.js.map +1 -0
- package/dist/esm/investigations/index.js +3 -0
- package/dist/esm/investigations/index.js.map +1 -0
- package/dist/esm/investigations/observe.js +204 -0
- package/dist/esm/investigations/observe.js.map +1 -0
- package/dist/esm/investigations/types.js +2 -0
- package/dist/esm/investigations/types.js.map +1 -0
- package/dist/esm/k6.js.map +1 -1
- package/dist/esm/lens/investigationLens.js +1 -1
- package/dist/esm/lens/investigationLens.js.map +1 -1
- package/dist/esm/lens/useInvestigationThroughLens.js +3 -1
- package/dist/esm/lens/useInvestigationThroughLens.js.map +1 -1
- package/dist/esm/limits/index.js +1 -1
- package/dist/esm/limits/index.js.map +1 -1
- package/dist/esm/pathfinder.js +41 -0
- package/dist/esm/pathfinder.js.map +1 -0
- package/dist/esm/sidebar.js +40 -20
- package/dist/esm/sidebar.js.map +1 -1
- package/dist/esm/terms/index.js +43 -5
- package/dist/esm/terms/index.js.map +1 -1
- package/dist/esm/tools/toolFactory.js.map +1 -1
- package/dist/esm/utils/errorHandling.js.map +1 -1
- package/dist/esm/utils/theme.js +11 -1
- package/dist/esm/utils/theme.js.map +1 -1
- package/dist/extension/extension.d.ts +206 -114
- package/dist/extension/extension.d.ts.map +1 -1
- package/dist/extension/index.d.ts +2 -1
- package/dist/extension/index.d.ts.map +1 -1
- package/dist/extension/suggestionContexts.d.ts +36 -0
- package/dist/extension/suggestionContexts.d.ts.map +1 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/inline/index.d.ts +1 -1
- package/dist/inline/index.d.ts.map +1 -1
- package/dist/inline/inlineAssistant.d.ts +19 -6
- package/dist/inline/inlineAssistant.d.ts.map +1 -1
- package/dist/inline/useInlineAssistant.d.ts +5 -1
- package/dist/inline/useInlineAssistant.d.ts.map +1 -1
- package/dist/investigations/api.gen.d.ts +1872 -0
- package/dist/investigations/api.gen.d.ts.map +1 -0
- package/dist/investigations/client.d.ts +8 -0
- package/dist/investigations/client.d.ts.map +1 -0
- package/dist/investigations/index.d.ts +5 -0
- package/dist/investigations/index.d.ts.map +1 -0
- package/dist/investigations/observe.d.ts +10 -0
- package/dist/investigations/observe.d.ts.map +1 -0
- package/dist/investigations/types.d.ts +26 -0
- package/dist/investigations/types.d.ts.map +1 -0
- package/dist/lens/investigationLens.d.ts +0 -5
- package/dist/lens/investigationLens.d.ts.map +1 -1
- package/dist/lens/useInvestigationThroughLens.d.ts.map +1 -1
- package/dist/pathfinder.d.ts +41 -0
- package/dist/pathfinder.d.ts.map +1 -0
- package/dist/sidebar.d.ts +15 -0
- package/dist/sidebar.d.ts.map +1 -1
- package/dist/terms/index.d.ts +8 -0
- package/dist/terms/index.d.ts.map +1 -1
- package/dist/terms/settings.gen.d.ts +470 -89
- package/dist/terms/settings.gen.d.ts.map +1 -1
- package/dist/tools/types.d.ts +3 -3
- package/dist/utils/theme.d.ts.map +1 -1
- 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
|
/**
|
|
@@ -30,6 +31,30 @@ export interface ToolChitProps {
|
|
|
30
31
|
/** Execution state of the tool call. */
|
|
31
32
|
status: 'running' | 'success' | 'error';
|
|
32
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];
|
|
33
58
|
/**
|
|
34
59
|
* A contribution to the Assistant chat track ("chits"): either an expanded-details renderer
|
|
35
60
|
* keyed by tool name, or a component rendered in place of a tag inside assistant text.
|
|
@@ -44,8 +69,8 @@ export interface ToolChitProps {
|
|
|
44
69
|
* text. The full tag name is the plugin id with non-alphanumerics collapsed to underscores,
|
|
45
70
|
* followed by an underscore and `name` — for example plugin `grafana-k6-app` with
|
|
46
71
|
* `name: 'result'` renders `<grafana_k6_app_result>…</grafana_k6_app_result>`. Tag children
|
|
47
|
-
* and allow-listed attributes are passed through as props
|
|
48
|
-
*
|
|
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.
|
|
49
74
|
*
|
|
50
75
|
* Component and function references are the only non-JSON-serializable parts of a manifest —
|
|
51
76
|
* refer to {@link AssistantExtensionManifest} for the serializability contract.
|
|
@@ -62,10 +87,14 @@ export type ChitContribution = {
|
|
|
62
87
|
kind: 'inline';
|
|
63
88
|
/** Plugin-local tag suffix: lowercase, `[a-z][a-z0-9]*`. Namespaced by the plugin id into the full tag name. */
|
|
64
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;
|
|
65
96
|
/** Rendered in place of the tag, inside a per-chit error boundary. Receives tag children and allow-listed attributes as props. */
|
|
66
|
-
component: ComponentType<
|
|
67
|
-
children?: ReactNode;
|
|
68
|
-
}>;
|
|
97
|
+
component: ComponentType<InlineChitProps>;
|
|
69
98
|
};
|
|
70
99
|
/**
|
|
71
100
|
* The artifact file node handed to plugin artifact renderers and toolbars.
|
|
@@ -76,6 +105,17 @@ export type ChitContribution = {
|
|
|
76
105
|
* @experimental This API is under active development and may change in future releases.
|
|
77
106
|
*/
|
|
78
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
|
+
};
|
|
79
119
|
/** File path of the artifact in the conversation's artifact filesystem. */
|
|
80
120
|
path: string;
|
|
81
121
|
/** The artifact kind extension, e.g. `.grafana-k6-app.test`. */
|
|
@@ -88,15 +128,13 @@ export interface AssistantArtifactNode {
|
|
|
88
128
|
* timestamp — carries no wall-clock meaning.
|
|
89
129
|
*/
|
|
90
130
|
revision: number;
|
|
131
|
+
/** Opaque backend revision for mounted files; use for cache keys when present. */
|
|
132
|
+
resourceRevision?: string;
|
|
91
133
|
}
|
|
92
134
|
/**
|
|
93
|
-
* Read-only
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
* The handle spans the whole conversation: it includes other plugins' and built-in artifacts by
|
|
97
|
-
* design — composition is the point. There is no write surface; artifact writes happen only
|
|
98
|
-
* through the Assistant's validated `write_artifact` path. Renderers must treat this handle as
|
|
99
|
-
* 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.
|
|
100
138
|
*
|
|
101
139
|
* @experimental This API is under active development and may change in future releases.
|
|
102
140
|
*/
|
|
@@ -113,11 +151,26 @@ export interface AssistantArtifactFs {
|
|
|
113
151
|
*
|
|
114
152
|
* @experimental This API is under active development and may change in future releases.
|
|
115
153
|
*/
|
|
154
|
+
/** Prefills the owning conversation. The user reviews and sends the turn. */
|
|
155
|
+
export type ArtifactRequestEdit = (input: {
|
|
156
|
+
message: string;
|
|
157
|
+
}) => void;
|
|
116
158
|
export interface ArtifactRendererProps {
|
|
117
159
|
/** The artifact node to render. */
|
|
118
160
|
node: AssistantArtifactNode;
|
|
119
161
|
/** Read-only handle over the conversation's artifact filesystem. */
|
|
120
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
|
+
};
|
|
121
174
|
}
|
|
122
175
|
/**
|
|
123
176
|
* Props passed to an optional plugin artifact toolbar.
|
|
@@ -129,6 +182,17 @@ export interface ArtifactToolbarProps {
|
|
|
129
182
|
node: AssistantArtifactNode;
|
|
130
183
|
/** Read-only handle over the conversation's artifact filesystem. */
|
|
131
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
|
+
};
|
|
132
196
|
}
|
|
133
197
|
/**
|
|
134
198
|
* A plugin-contributed artifact kind for the Assistant canvas.
|
|
@@ -143,34 +207,103 @@ export interface ArtifactToolbarProps {
|
|
|
143
207
|
*
|
|
144
208
|
* @experimental This API is under active development and may change in future releases.
|
|
145
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
|
+
};
|
|
146
222
|
export interface ArtifactKindContribution {
|
|
147
223
|
/** Artifact extension in the form `.{pluginId}.{kind}` (exact plugin id), double-dot namespaced. */
|
|
148
224
|
ext: `.${string}.${string}`;
|
|
149
225
|
/** Human-readable label shown on artifact tabs and cards. */
|
|
150
226
|
label: string;
|
|
151
|
-
/** Icon name
|
|
227
|
+
/** Icon name. The current host displays a generic plugin icon instead. */
|
|
152
228
|
icon: string;
|
|
153
229
|
/**
|
|
154
|
-
*
|
|
155
|
-
*
|
|
156
|
-
* cannot be jumped — the host clamps this value to non-negative and offsets it into a range
|
|
157
|
-
* after every built-in, so it only orders your kinds relative to other plugin-contributed
|
|
158
|
-
* kinds. Ties break by most recently updated artifact first; kinds with no live registration
|
|
159
|
-
* 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.
|
|
160
232
|
*/
|
|
161
233
|
tabPriority: number;
|
|
162
|
-
/**
|
|
163
|
-
validate(data: unknown):
|
|
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;
|
|
164
239
|
/** Renders the artifact in the canvas. Receives the artifact node and a read-only conversation filesystem handle. */
|
|
165
240
|
renderer: ComponentType<ArtifactRendererProps>;
|
|
166
241
|
/** Optional toolbar rendered above the artifact. */
|
|
167
242
|
toolbar?: ComponentType<ArtifactToolbarProps>;
|
|
168
|
-
/**
|
|
243
|
+
/** Reserved hint. Accepted by the host but not currently sent to the model. */
|
|
169
244
|
promptHint?: string;
|
|
170
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
|
+
}
|
|
171
278
|
/**
|
|
172
|
-
*
|
|
173
|
-
*
|
|
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.
|
|
174
307
|
*
|
|
175
308
|
* @experimental This API is under active development and may change in future releases.
|
|
176
309
|
*/
|
|
@@ -180,7 +313,10 @@ export type PromptContributionAvailability = 'not-oss' | 'not-trial';
|
|
|
180
313
|
*
|
|
181
314
|
* The contribution is exposed in the mode picker as `${pluginId}:${modeId}` and its prompt text
|
|
182
315
|
* is always rendered inside an attributed `<plugin_contribution>` wrapper, subject to a
|
|
183
|
-
*
|
|
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.
|
|
184
320
|
*
|
|
185
321
|
* All fields are JSON-serializable — refer to {@link AssistantExtensionManifest} for the
|
|
186
322
|
* serializability contract.
|
|
@@ -194,7 +330,7 @@ export interface PromptContribution {
|
|
|
194
330
|
label: string;
|
|
195
331
|
/** Short description of the mode shown in the mode picker. */
|
|
196
332
|
description: string;
|
|
197
|
-
/**
|
|
333
|
+
/** Intended suggestion guidance. Required by the schema, but not currently applied by the host. */
|
|
198
334
|
whenToUse: string;
|
|
199
335
|
/**
|
|
200
336
|
* How `prompt` composes with the base system prompt.
|
|
@@ -216,39 +352,27 @@ export interface PromptContribution {
|
|
|
216
352
|
* {@link PromptContribution.compose}.
|
|
217
353
|
*/
|
|
218
354
|
prompt: string;
|
|
219
|
-
/**
|
|
355
|
+
/** Reserved first-message text. The current host does not send it. */
|
|
220
356
|
initialMessage?: string;
|
|
221
|
-
/**
|
|
222
|
-
* Whether the mode can be switched to mid-conversation. Defaults to true. When false the mode
|
|
223
|
-
* is entry-point only: listed on fresh chats and reachable via deep links, but hidden from the
|
|
224
|
-
* picker mid-conversation and excluded from mode suggestions.
|
|
225
|
-
*/
|
|
357
|
+
/** Reserved switching preference. The current host does not apply it. */
|
|
226
358
|
switchable?: boolean;
|
|
227
|
-
/**
|
|
359
|
+
/** Reserved availability conditions. The current host does not evaluate them for plugin modes. */
|
|
228
360
|
availability?: PromptContributionAvailability[];
|
|
229
|
-
/**
|
|
361
|
+
/** Reserved tool scoping. The current host does not restrict tools using this field. */
|
|
230
362
|
modeToolNames?: string[];
|
|
231
|
-
/**
|
|
363
|
+
/** Reserved icon name. The current host displays a generic plugin icon. */
|
|
232
364
|
icon?: string;
|
|
233
|
-
/**
|
|
365
|
+
/** Reserved badge. The current host does not apply it. */
|
|
234
366
|
featureState?: 'preview' | 'experimental';
|
|
235
367
|
}
|
|
236
368
|
/**
|
|
237
|
-
* A proposed first message
|
|
238
|
-
*
|
|
239
|
-
*
|
|
240
|
-
* Selecting a starter sends `message` as an ordinary, user-visible user message. Starters are
|
|
241
|
-
* never auto-sent, never hidden, and never modify the system prompt — which is why they are part
|
|
242
|
-
* of the v1 chat-content surface (master flag + per-plugin kill switch only; no allowlist, no
|
|
243
|
-
* prompt-contributions flag). Contrast with {@link PromptContribution.initialMessage}, which is
|
|
244
|
-
* hidden, auto-sent on mode selection, and ships behind the v2 prompt-contributions flag.
|
|
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.
|
|
245
372
|
*
|
|
246
|
-
*
|
|
247
|
-
*
|
|
248
|
-
*
|
|
249
|
-
* Starters are pure data (fully JSON-serializable), making them ideal for the future static
|
|
250
|
-
* `plugin.json` transport — refer to {@link AssistantExtensionManifest} for the serializability
|
|
251
|
-
* 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.
|
|
252
376
|
*
|
|
253
377
|
* @experimental This API is under active development and may change in future releases.
|
|
254
378
|
*/
|
|
@@ -257,59 +381,45 @@ export interface AssistantStarter {
|
|
|
257
381
|
label?: string;
|
|
258
382
|
/** The user message sent, visibly and as-is, when the starter is selected. Max 500 characters. */
|
|
259
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[];
|
|
260
388
|
}
|
|
261
389
|
/**
|
|
262
|
-
* A plugin
|
|
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.
|
|
263
396
|
*
|
|
264
|
-
*
|
|
265
|
-
*
|
|
266
|
-
*
|
|
267
|
-
* loads it. Contrast with {@link PromptContribution}, which splices resident text into the
|
|
268
|
-
* system prompt and ships behind a stricter flag and allowlist tier — skills need neither.
|
|
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.
|
|
269
400
|
*
|
|
270
|
-
*
|
|
271
|
-
* page, attributed to your plugin. The catalog/load path that puts skills in front of the model
|
|
272
|
-
* ships with the Assistant's agent-skills runtime and lights up automatically when it lands —
|
|
273
|
-
* no plugin-side change needed.
|
|
274
|
-
*
|
|
275
|
-
* Each skill is identified by the handle `plugin:{yourPluginId}:{id}`, with the plugin id taken
|
|
276
|
-
* from the extension registry — so skills can never collide with built-in or tenant skills, or
|
|
277
|
-
* with another plugin's. Plugin skills are never persisted or indexed: they exist only while
|
|
278
|
-
* your registration is live, and disappear everywhere at once when it is removed.
|
|
279
|
-
*
|
|
280
|
-
* Enforced bounds (entries violating any bound are dropped whole by the Assistant, never
|
|
281
|
-
* truncated): max 5 skills per plugin; `id` matching `[a-z][a-z0-9-]*`, at most 64 characters;
|
|
282
|
-
* `title` at most 80 characters; `description` at most 500 characters; `content` at most
|
|
283
|
-
* 32768 UTF-8 bytes.
|
|
284
|
-
*
|
|
285
|
-
* Skills are pure data (fully JSON-serializable), making them ideal for the future static
|
|
286
|
-
* `plugin.json` transport — refer to {@link AssistantExtensionManifest} for the serializability
|
|
287
|
-
* contract.
|
|
401
|
+
* The host keeps the first 5 valid, unique IDs and drops entries that exceed field limits.
|
|
288
402
|
*
|
|
289
403
|
* @experimental This API is under active development and may change in future releases.
|
|
290
404
|
*/
|
|
291
405
|
export interface SkillContribution {
|
|
292
406
|
/** Plugin-local skill id: `[a-z][a-z0-9-]*`, max 64 characters. Namespaced by the plugin id into the catalog handle. */
|
|
293
407
|
id: string;
|
|
294
|
-
/**
|
|
408
|
+
/** Nonblank title shown in settings. Max 80 characters. */
|
|
295
409
|
title: string;
|
|
296
410
|
/** One or two sentences describing what the skill does and when to use it. Max 500 characters. */
|
|
297
411
|
description: string;
|
|
298
|
-
/**
|
|
412
|
+
/** Nonblank Markdown body. Model loading is not implemented yet. Max 32768 UTF-8 bytes. */
|
|
299
413
|
content: string;
|
|
300
414
|
}
|
|
301
415
|
/**
|
|
302
|
-
*
|
|
303
|
-
*
|
|
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.
|
|
304
419
|
*
|
|
305
|
-
*
|
|
306
|
-
*
|
|
307
|
-
*
|
|
308
|
-
* it enables a future transport where the static halves of a manifest are declared in signed
|
|
309
|
-
* `plugin.json` metadata and only component references are resolved at runtime.
|
|
310
|
-
*
|
|
311
|
-
* Unknown fields and unknown contribution kinds are ignored by the Assistant, so manifests
|
|
312
|
-
* produced by newer SDK versions degrade gracefully on older Assistant versions.
|
|
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.
|
|
313
423
|
*
|
|
314
424
|
* @experimental This API is under active development and may change in future releases.
|
|
315
425
|
*/
|
|
@@ -318,42 +428,24 @@ export interface AssistantExtensionManifest {
|
|
|
318
428
|
schemaVersion: 1;
|
|
319
429
|
/** Chat-track contributions: tool-details renderers and inline components. */
|
|
320
430
|
chits?: ChitContribution[];
|
|
321
|
-
/**
|
|
322
|
-
* Proposed first messages offered on fresh chats, attributed to the plugin. Max 3.
|
|
323
|
-
*
|
|
324
|
-
* When to use which: use `provideQuestions` to suggest questions on pages YOUR plugin already
|
|
325
|
-
* runs on (URL-scoped, page-context registry, requires your module to be loaded on that page,
|
|
326
|
-
* unattributed); use manifest `starters` for proposed first messages in the Assistant's fresh
|
|
327
|
-
* chats ANYWHERE (extension-point transport, loads your module on demand, plugin-attributed,
|
|
328
|
-
* governed by the Assistant's per-plugin kill switch and caps, statically declarable in the
|
|
329
|
-
* future). They intentionally share the same rendering surface and send path.
|
|
330
|
-
*/
|
|
431
|
+
/** Proposed first messages on empty chats, attributed to the plugin. Max 3 valid entries. */
|
|
331
432
|
starters?: AssistantStarter[];
|
|
332
|
-
/**
|
|
333
|
-
* Skills teaching the Assistant plugin-specific workflows, loaded on demand. Max 5.
|
|
334
|
-
*
|
|
335
|
-
* When to use which: use `skills` to document a workflow the Assistant should follow when a
|
|
336
|
-
* conversation enters your plugin's territory — only a one-line catalog entry is resident, and
|
|
337
|
-
* the body loads on invocation. Use `promptContributions` only for a full mode whose resident
|
|
338
|
-
* prompt text must always be present; that surface sits behind a stricter flag and allowlist
|
|
339
|
-
* tier. Skill content reaches the model only where the Assistant's agent-skills runtime is
|
|
340
|
-
* enabled; the read-only settings listing needs no additional flag.
|
|
341
|
-
*/
|
|
433
|
+
/** Plugin workflows listed in settings. Model loading is not implemented yet. Max 5 valid entries. */
|
|
342
434
|
skills?: SkillContribution[];
|
|
343
435
|
/** Canvas artifact kinds. */
|
|
344
436
|
artifactKinds?: ArtifactKindContribution[];
|
|
437
|
+
/** Optional persistent filesystem, mounted under the registering plugin ID. */
|
|
438
|
+
filesystem?: AssistantFilesystemContribution;
|
|
345
439
|
/** Assistant mode / system prompt contributions. */
|
|
346
440
|
promptContributions?: PromptContribution[];
|
|
347
441
|
}
|
|
348
442
|
/**
|
|
349
|
-
* Builds the
|
|
350
|
-
*
|
|
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.
|
|
351
446
|
*
|
|
352
|
-
*
|
|
353
|
-
*
|
|
354
|
-
* dedups deep-equal results; an unstable manifest churns downstream consumers and invalidates
|
|
355
|
-
* prompt caching. Gate on your own feature flags *before* registering rather than returning a
|
|
356
|
-
* 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.
|
|
357
449
|
*
|
|
358
450
|
* @example
|
|
359
451
|
* ```typescript
|
|
@@ -363,7 +455,7 @@ export interface AssistantExtensionManifest {
|
|
|
363
455
|
* export const plugin = new AppPlugin().addFunction(
|
|
364
456
|
* getAssistantExtensionConfig({
|
|
365
457
|
* schemaVersion: 1,
|
|
366
|
-
*
|
|
458
|
+
* starters: [{ message: 'Help me review recent service errors in this stack.' }],
|
|
367
459
|
* })
|
|
368
460
|
* );
|
|
369
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;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AE,SAAS,iBAAiB,EAAE,CAAC;CACzC;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,iBAAiB;IAChC,wHAAwH;IACxH,EAAE,EAAE,MAAM,CAAC;IACX,2DAA2D;IAC3D,KAAK,EAAE,MAAM,CAAC;IACd,kGAAkG;IAClG,WAAW,EAAE,MAAM,CAAC;IACpB,2FAA2F;IAC3F,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,0BAA0B;IACzC,8DAA8D;IAC9D,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, type SkillContribution, } 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,EACrB,KAAK,iBAAiB,GACvB,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
|
package/dist/index.d.ts.map
CHANGED
|
@@ -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,gBAAgB,EAChB,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,CA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