@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.
- package/README.md +187 -33
- 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 +8 -9
- 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 +243 -90
- 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 +565 -50
- 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
|
/**
|
|
@@ -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-
|
|
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
|
|
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
|
|
34
|
-
* or a
|
|
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-
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
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-
|
|
49
|
-
/** Fully namespaced tool names this
|
|
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
|
|
84
|
+
/** The details component, rendered inside a per-chit error boundary. */
|
|
52
85
|
component: ComponentType<ToolChitProps>;
|
|
53
86
|
} | {
|
|
54
|
-
kind: '
|
|
55
|
-
/**
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
|
|
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
|
|
84
|
-
*
|
|
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
|
|
227
|
+
/** Icon name. The current host displays a generic plugin icon instead. */
|
|
142
228
|
icon: string;
|
|
143
229
|
/**
|
|
144
|
-
*
|
|
145
|
-
*
|
|
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
|
-
/**
|
|
153
|
-
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;
|
|
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
|
-
/**
|
|
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
|
-
*
|
|
163
|
-
*
|
|
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
|
-
*
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
359
|
+
/** Reserved availability conditions. The current host does not evaluate them for plugin modes. */
|
|
218
360
|
availability?: PromptContributionAvailability[];
|
|
219
|
-
/**
|
|
361
|
+
/** Reserved tool scoping. The current host does not restrict tools using this field. */
|
|
220
362
|
modeToolNames?: string[];
|
|
221
|
-
/**
|
|
363
|
+
/** Reserved icon name. The current host displays a generic plugin icon. */
|
|
222
364
|
icon?: string;
|
|
223
|
-
/**
|
|
365
|
+
/** Reserved badge. The current host does not apply it. */
|
|
224
366
|
featureState?: 'preview' | 'experimental';
|
|
225
367
|
}
|
|
226
368
|
/**
|
|
227
|
-
* A proposed first message
|
|
228
|
-
*
|
|
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
|
-
*
|
|
240
|
-
* `
|
|
241
|
-
*
|
|
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
|
-
*
|
|
253
|
-
*
|
|
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
|
-
*
|
|
256
|
-
*
|
|
257
|
-
*
|
|
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
|
-
*
|
|
262
|
-
*
|
|
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
|
|
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
|
|
289
|
-
*
|
|
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
|
-
*
|
|
292
|
-
*
|
|
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
|
-
*
|
|
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
|
|
1
|
+
{"version":3,"file":"extension.d.ts","sourceRoot":"","sources":["../../src/extension/extension.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sB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ACpD,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,
|
|
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"}
|
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