@grafana/assistant 0.1.34 → 0.1.36
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 +296 -42
- package/dist/analyticsEvents.d.ts +33 -0
- package/dist/analyticsEvents.d.ts.map +1 -0
- package/dist/components/button/OpenAssistantButton.d.ts +9 -4
- 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/grots/GrotAvatar.d.ts +31 -0
- package/dist/components/grots/GrotAvatar.d.ts.map +1 -0
- package/dist/components/grots/GrotTopicView.d.ts +19 -0
- package/dist/components/grots/GrotTopicView.d.ts.map +1 -0
- package/dist/components/grots/OpenGrotButton.d.ts +23 -0
- package/dist/components/grots/OpenGrotButton.d.ts.map +1 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.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/analyticsEvents.js +31 -0
- package/dist/esm/analyticsEvents.js.map +1 -0
- package/dist/esm/components/button/OpenAssistantButton.js +13 -12
- package/dist/esm/components/button/OpenAssistantButton.js.map +1 -1
- package/dist/esm/components/button/OpenAssistantSplitButton.js +3 -2
- package/dist/esm/components/button/OpenAssistantSplitButton.js.map +1 -1
- package/dist/esm/components/grots/GrotAvatar.js +37 -0
- package/dist/esm/components/grots/GrotAvatar.js.map +1 -0
- package/dist/esm/components/grots/GrotTopicView.js +25 -0
- package/dist/esm/components/grots/GrotTopicView.js.map +1 -0
- package/dist/esm/components/grots/OpenGrotButton.js +36 -0
- package/dist/esm/components/grots/OpenGrotButton.js.map +1 -0
- package/dist/esm/components/index.js +3 -0
- package/dist/esm/components/index.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 +2 -2
- 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/grots/avatar/appearance.js +303 -0
- package/dist/esm/grots/avatar/appearance.js.map +1 -0
- package/dist/esm/grots/avatar/sprite.js +481 -0
- package/dist/esm/grots/avatar/sprite.js.map +1 -0
- package/dist/esm/grots/client.js +377 -0
- package/dist/esm/grots/client.js.map +1 -0
- package/dist/esm/grots/index.js +2 -0
- package/dist/esm/grots/index.js.map +1 -0
- package/dist/esm/grots/retry.js +67 -0
- package/dist/esm/grots/retry.js.map +1 -0
- package/dist/esm/grots/types.js +2 -0
- package/dist/esm/grots/types.js.map +1 -0
- package/dist/esm/index.js +4 -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 +44 -23
- 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/grots/avatar/appearance.d.ts +82 -0
- package/dist/grots/avatar/appearance.d.ts.map +1 -0
- package/dist/grots/avatar/sprite.d.ts +84 -0
- package/dist/grots/avatar/sprite.d.ts.map +1 -0
- package/dist/grots/client.d.ts +130 -0
- package/dist/grots/client.d.ts.map +1 -0
- package/dist/grots/index.d.ts +3 -0
- package/dist/grots/index.d.ts.map +1 -0
- package/dist/grots/retry.d.ts +7 -0
- package/dist/grots/retry.d.ts.map +1 -0
- package/dist/grots/types.d.ts +331 -0
- package/dist/grots/types.d.ts.map +1 -0
- package/dist/index.d.ts +4 -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
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Options accepted by every Grots call.
|
|
3
|
+
*
|
|
4
|
+
* @experimental This API is under active development and may change in future releases.
|
|
5
|
+
*/
|
|
6
|
+
export interface GrotRequestOptions {
|
|
7
|
+
signal?: AbortSignal;
|
|
8
|
+
/**
|
|
9
|
+
* Retry transient failures. Off by default, like the Go SDK's Grots methods, which never retry. Pass `true` for
|
|
10
|
+
* the defaults of the Go SDK's `Chat` policy (3 attempts in total, 500 ms doubling to at most 10 s, plus or minus
|
|
11
|
+
* 10% jitter, on 429, 502, 503 and 504) or a {@link GrotRetryOptions} to tune it. `false` is the same as leaving it
|
|
12
|
+
* out. Only calls that are safe to repeat honor it: reads and the calls that carry a `dedupeKey`
|
|
13
|
+
* (`wakeGrot`, `createGrotTopic`, `postGrotTopicMessage`). `createGrot`, `bindGrot`, `closeGrotLane`, `updateGrot`,
|
|
14
|
+
* `updateGrotTopic` and `archiveGrotTopic` never retry.
|
|
15
|
+
*/
|
|
16
|
+
retry?: boolean | GrotRetryOptions;
|
|
17
|
+
}
|
|
18
|
+
/** @experimental This API is under active development and may change in future releases. */
|
|
19
|
+
export interface GrotRetryOptions {
|
|
20
|
+
/** Total attempts including the first, a whole number of at least 1. Default 3, also used for any other value. */
|
|
21
|
+
maxAttempts?: number;
|
|
22
|
+
/** Wait before the second attempt, in ms. Default 500, also used for NaN, Infinity or a negative value. */
|
|
23
|
+
initialBackoffMs?: number;
|
|
24
|
+
/** Upper bound of the wait, in ms. Default 10000, also used for NaN, Infinity or a negative value. */
|
|
25
|
+
maxBackoffMs?: number;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* A Grot (durable agent) as the Grots API returns it. Unknown fields are dropped.
|
|
29
|
+
*
|
|
30
|
+
* @experimental This API is under active development and may change in future releases.
|
|
31
|
+
*/
|
|
32
|
+
export interface Grot {
|
|
33
|
+
id: string;
|
|
34
|
+
name: string;
|
|
35
|
+
purpose?: string;
|
|
36
|
+
role?: string;
|
|
37
|
+
/** `user` (private to its creator), `team` or `tenant`. Kept an open string so newer scopes survive. */
|
|
38
|
+
scope?: string;
|
|
39
|
+
teamId?: string;
|
|
40
|
+
status?: string;
|
|
41
|
+
/** The Grot's look: its sprite parts in order, such as `mint.fin.band.bars.smile.cap.empty.curl`. Pass it to `GrotAvatar`. */
|
|
42
|
+
avatar?: string;
|
|
43
|
+
revision: number;
|
|
44
|
+
/** Kubernetes-style metadata. Absent on backends that predate labels. */
|
|
45
|
+
labels?: Record<string, string>;
|
|
46
|
+
}
|
|
47
|
+
/** @experimental This API is under active development and may change in future releases. */
|
|
48
|
+
export interface ListGrotsOptions extends GrotRequestOptions {
|
|
49
|
+
/**
|
|
50
|
+
* Keep the Grots whose labels match a Kubernetes label selector, such as `team=payments,!legacy`.
|
|
51
|
+
* The server returns at most the newest 100 Grots. A backend that predates labels ignores the selector.
|
|
52
|
+
*/
|
|
53
|
+
labelSelector?: string;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* The execution binding the backend accepts today, for both scopes. Whose access the Grot runs with depends on its
|
|
57
|
+
* scope, not on this value:
|
|
58
|
+
*
|
|
59
|
+
* - A private (`user`) Grot runs with its owner's current Grafana permissions. It can do what the owner can do at the
|
|
60
|
+
* time it runs, so it loses access when the owner does. That is what `ownerDelegation: true` consents to.
|
|
61
|
+
* - A team Grot runs as a service account scoped to its team, not as the person who created or bound it.
|
|
62
|
+
*
|
|
63
|
+
* Explain this to your users before you bind a Grot for them: on a private Grot they are granting their own access.
|
|
64
|
+
*
|
|
65
|
+
* @experimental This API is under active development and may change in future releases.
|
|
66
|
+
*/
|
|
67
|
+
export type GrotExecutionBinding = 'assistant-tenant-service';
|
|
68
|
+
/**
|
|
69
|
+
* The tools a bound Grot may call, as the backend validates them (Go: the `grant` of `AgentCreate` and
|
|
70
|
+
* `BindingUpdate`). The backend refuses any other property, an empty `allowedTools` with `allowAllTools: false`,
|
|
71
|
+
* a blank tool name, a name over 256 characters and a grant over 16000 bytes.
|
|
72
|
+
*
|
|
73
|
+
* Either `allowAllTools: true`, which lets the Grot call every tool the Assistant has, including ones added later,
|
|
74
|
+
* or `allowAllTools: false` with the names of the tools it may call.
|
|
75
|
+
*
|
|
76
|
+
* @experimental This API is under active development and may change in future releases.
|
|
77
|
+
*/
|
|
78
|
+
export type GrotGrant = {
|
|
79
|
+
allowAllTools: true;
|
|
80
|
+
} | {
|
|
81
|
+
allowAllTools: false;
|
|
82
|
+
allowedTools: [string, ...string[]];
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* Body of `createGrot`. These are the fields the Go SDK's `CreateGrot` sends, plus the optional `executionBinding`
|
|
86
|
+
* and `grant` the Go SDK does not expose. Without those two the Grot stays a `draft` that cannot run: creating a
|
|
87
|
+
* topic fails with 400 "configure an execution identity before running the agent". Nothing is added for you.
|
|
88
|
+
* @experimental This API is under active development and may change in future releases.
|
|
89
|
+
*/
|
|
90
|
+
export interface CreateGrotInput {
|
|
91
|
+
/** 1 to 256 characters. */
|
|
92
|
+
name: string;
|
|
93
|
+
purpose?: string;
|
|
94
|
+
/** A few words shown beside the name, at most 40 characters. */
|
|
95
|
+
role?: string;
|
|
96
|
+
/**
|
|
97
|
+
* `user` (the backend default) makes a private Grot only you can use; `team` needs `teamId`.
|
|
98
|
+
* Shared (`tenant`) Grots can't be created any more; `Grot.scope` stays an open string for reading them.
|
|
99
|
+
*/
|
|
100
|
+
scope?: 'user' | 'team';
|
|
101
|
+
/** Grafana team ID. Required with `scope: 'team'`, refused otherwise. */
|
|
102
|
+
teamId?: string;
|
|
103
|
+
/**
|
|
104
|
+
* Consent for a private (`user` scope) Grot to run unattended using YOUR Grafana permissions, the permissions
|
|
105
|
+
* you hold when you call this, for background work. The backend rejects a private Grot (the default scope)
|
|
106
|
+
* without it, and rejects it on any other scope. Only set it when the person using your code has agreed.
|
|
107
|
+
*/
|
|
108
|
+
ownerDelegation?: boolean;
|
|
109
|
+
/**
|
|
110
|
+
* Gives the Grot access at creation: it becomes `active` and its background work starts, so it can run. Send it
|
|
111
|
+
* together with `grant`; the backend refuses either one alone. Needs `durable-agents:configure` and
|
|
112
|
+
* `durable-agents.<scope>:execute`, besides the create permission. Only set it when the person using your code
|
|
113
|
+
* has explicitly agreed to give the Grot access. Never defaulted. A private Grot then runs with its owner's current
|
|
114
|
+
* Grafana permissions, a team Grot with its team's scoped service account; see {@link GrotExecutionBinding}. To
|
|
115
|
+
* bind a Grot you already created, use {@link bindGrot}.
|
|
116
|
+
*/
|
|
117
|
+
executionBinding?: GrotExecutionBinding;
|
|
118
|
+
/**
|
|
119
|
+
* The tools the bound Grot may call. `{ allowAllTools: true }` grants every tool, so reserve it for a Grot whose
|
|
120
|
+
* user knowingly accepts that; otherwise list the tools in `allowedTools`. Send it together with
|
|
121
|
+
* `executionBinding`. Never defaulted.
|
|
122
|
+
*/
|
|
123
|
+
grant?: GrotGrant;
|
|
124
|
+
/** Free-form Kubernetes-style labels. The server enforces the limits and reserves `assistant.grafana.com/`. */
|
|
125
|
+
labels?: Record<string, string>;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Body of `bindGrot`: the Grot's access, replacing any it had. Unlike on `createGrot` both fields are required.
|
|
129
|
+
* @experimental This API is under active development and may change in future releases.
|
|
130
|
+
*/
|
|
131
|
+
export interface BindGrotInput {
|
|
132
|
+
/** The Grot's `revision` as you last read it. A stale value returns 409. */
|
|
133
|
+
expectedRevision: number;
|
|
134
|
+
executionBinding: GrotExecutionBinding;
|
|
135
|
+
grant: GrotGrant;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Body of `updateGrot`, the fields the Go SDK's `GrotUpdate` sends. A field you leave out stays unchanged. The call
|
|
139
|
+
* cannot change tool grants, permissions or the execution binding (use {@link bindGrot}), and drops any such
|
|
140
|
+
* property you pass.
|
|
141
|
+
* @experimental This API is under active development and may change in future releases.
|
|
142
|
+
*/
|
|
143
|
+
export interface UpdateGrotInput {
|
|
144
|
+
/** The Grot's `revision` as you last read it. A stale value returns 409. */
|
|
145
|
+
expectedRevision: number;
|
|
146
|
+
name?: string;
|
|
147
|
+
purpose?: string;
|
|
148
|
+
role?: string;
|
|
149
|
+
/** Replaces the whole label set; an empty object clears it. */
|
|
150
|
+
labels?: Record<string, string>;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Body of `updateGrotTopic`. A field you leave out stays unchanged.
|
|
154
|
+
*
|
|
155
|
+
* @experimental This API is under active development and may change in future releases.
|
|
156
|
+
*/
|
|
157
|
+
export interface UpdateGrotTopicInput {
|
|
158
|
+
/** The topic's `revision` as you last read it. A stale value returns 409. */
|
|
159
|
+
expectedRevision: number;
|
|
160
|
+
/** 1 to 120 characters. */
|
|
161
|
+
title?: string;
|
|
162
|
+
/** True archives the topic, false restores it. */
|
|
163
|
+
archived?: boolean;
|
|
164
|
+
/** True pins the topic, false unpins it. */
|
|
165
|
+
pinned?: boolean;
|
|
166
|
+
}
|
|
167
|
+
/** @experimental This API is under active development and may change in future releases. */
|
|
168
|
+
export interface GrotEvent {
|
|
169
|
+
/** The workflow definition's `metadata.name`. */
|
|
170
|
+
workflow: string;
|
|
171
|
+
/** Optional display name used as the topic title. */
|
|
172
|
+
title?: string;
|
|
173
|
+
/** Identifies the event, for example run ID plus step ID. Same key and body returns the same work; a changed body returns 409. */
|
|
174
|
+
dedupeKey: string;
|
|
175
|
+
content: string;
|
|
176
|
+
runId?: string;
|
|
177
|
+
stepId?: string;
|
|
178
|
+
/** Names an outside object, such as an incident ID. 1 to 128 printable ASCII characters without spaces. */
|
|
179
|
+
laneKey?: string;
|
|
180
|
+
}
|
|
181
|
+
/** @experimental This API is under active development and may change in future releases. */
|
|
182
|
+
export interface GrotWork {
|
|
183
|
+
id: string;
|
|
184
|
+
state: string;
|
|
185
|
+
}
|
|
186
|
+
/** @experimental This API is under active development and may change in future releases. */
|
|
187
|
+
export interface GrotLaneClosed {
|
|
188
|
+
laneKey: string;
|
|
189
|
+
/** False when the lane was unknown or already closed. */
|
|
190
|
+
closed: boolean;
|
|
191
|
+
cancelledFollowUps: number;
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* A raw chat message in AI SDK UIMessage format; read its `id` as the `after` cursor.
|
|
195
|
+
*
|
|
196
|
+
* @experimental This API is under active development and may change in future releases.
|
|
197
|
+
*/
|
|
198
|
+
export type GrotMessage = Record<string, unknown>;
|
|
199
|
+
/** @experimental This API is under active development and may change in future releases. */
|
|
200
|
+
export interface GrotMessagesPage {
|
|
201
|
+
messages: GrotMessage[];
|
|
202
|
+
total?: number;
|
|
203
|
+
from?: number;
|
|
204
|
+
/** True when `messages` is the whole chat rather than the tail after `after`. */
|
|
205
|
+
reset?: boolean;
|
|
206
|
+
}
|
|
207
|
+
/** @experimental This API is under active development and may change in future releases. */
|
|
208
|
+
export interface GrotLane extends GrotMessagesPage {
|
|
209
|
+
laneKey: string;
|
|
210
|
+
topicId: string;
|
|
211
|
+
chatId: string;
|
|
212
|
+
title: string;
|
|
213
|
+
settled: boolean;
|
|
214
|
+
runningWorkId?: string;
|
|
215
|
+
pendingWork: number;
|
|
216
|
+
busy: boolean;
|
|
217
|
+
}
|
|
218
|
+
/** @experimental This API is under active development and may change in future releases. */
|
|
219
|
+
export interface ReadGrotLaneOptions extends GrotRequestOptions {
|
|
220
|
+
/** ID of the last message you hold. */
|
|
221
|
+
after?: string;
|
|
222
|
+
}
|
|
223
|
+
/** @experimental This API is under active development and may change in future releases. */
|
|
224
|
+
export interface CreateGrotTopicInput {
|
|
225
|
+
/** Up to 512 bytes (the server checks UTF-8 bytes, so multibyte text fits fewer characters). */
|
|
226
|
+
title?: string;
|
|
227
|
+
/** The first message: non-blank text, up to 32000 bytes. */
|
|
228
|
+
content: string;
|
|
229
|
+
/** 1 to 128 bytes, without ":". Shared across the whole Grot. */
|
|
230
|
+
dedupeKey: string;
|
|
231
|
+
}
|
|
232
|
+
/** @experimental This API is under active development and may change in future releases. */
|
|
233
|
+
export interface GrotTopicMessageInput {
|
|
234
|
+
/** Non-blank text, up to 32000 bytes. */
|
|
235
|
+
content: string;
|
|
236
|
+
/** 1 to 128 bytes, without ":". Shared across the whole Grot. */
|
|
237
|
+
dedupeKey: string;
|
|
238
|
+
}
|
|
239
|
+
/** @experimental This API is under active development and may change in future releases. */
|
|
240
|
+
export interface GrotTopic {
|
|
241
|
+
id: string;
|
|
242
|
+
agentId: string;
|
|
243
|
+
threadId: string;
|
|
244
|
+
number: number;
|
|
245
|
+
title: string;
|
|
246
|
+
/** Pass to `listGrotTopicMessages`. */
|
|
247
|
+
chatId: string;
|
|
248
|
+
revision: number;
|
|
249
|
+
createdBy: string;
|
|
250
|
+
archivedAt?: string;
|
|
251
|
+
pinnedAt?: string;
|
|
252
|
+
}
|
|
253
|
+
/** @experimental This API is under active development and may change in future releases. */
|
|
254
|
+
export interface GrotTopicAccepted {
|
|
255
|
+
topic: GrotTopic;
|
|
256
|
+
work: GrotWork;
|
|
257
|
+
}
|
|
258
|
+
/** @experimental This API is under active development and may change in future releases. */
|
|
259
|
+
export interface GrotDirectTopic extends GrotTopic {
|
|
260
|
+
runningWorkId?: string;
|
|
261
|
+
helpersWorking?: boolean;
|
|
262
|
+
}
|
|
263
|
+
/** @experimental This API is under active development and may change in future releases. */
|
|
264
|
+
export interface GrotTopicList {
|
|
265
|
+
thread?: {
|
|
266
|
+
id: string;
|
|
267
|
+
agentId: string;
|
|
268
|
+
title: string;
|
|
269
|
+
};
|
|
270
|
+
topics: GrotDirectTopic[];
|
|
271
|
+
settledCount?: number;
|
|
272
|
+
}
|
|
273
|
+
/** @experimental This API is under active development and may change in future releases. */
|
|
274
|
+
export interface ListGrotTopicsOptions extends GrotRequestOptions {
|
|
275
|
+
/** Leave archived topics out and count them in `settledCount`. */
|
|
276
|
+
excludeSettled?: boolean;
|
|
277
|
+
}
|
|
278
|
+
/** @experimental This API is under active development and may change in future releases. */
|
|
279
|
+
export interface ListGrotTopicMessagesOptions extends GrotRequestOptions {
|
|
280
|
+
/** ID of the last message you hold. */
|
|
281
|
+
after?: string;
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* One part of a parsed message. Part types this client does not know stay readable as `unknown`.
|
|
285
|
+
*
|
|
286
|
+
* @experimental This API is under active development and may change in future releases.
|
|
287
|
+
*/
|
|
288
|
+
export type GrotMessagePart = {
|
|
289
|
+
kind: 'text';
|
|
290
|
+
text: string;
|
|
291
|
+
} | {
|
|
292
|
+
kind: 'reasoning';
|
|
293
|
+
text: string;
|
|
294
|
+
} | {
|
|
295
|
+
kind: 'tool';
|
|
296
|
+
type: string;
|
|
297
|
+
toolName?: string;
|
|
298
|
+
state?: string;
|
|
299
|
+
} | {
|
|
300
|
+
kind: 'unknown';
|
|
301
|
+
type: string;
|
|
302
|
+
raw: Record<string, unknown>;
|
|
303
|
+
};
|
|
304
|
+
interface ParsedGrotMessageBase {
|
|
305
|
+
id: string;
|
|
306
|
+
parts: GrotMessagePart[];
|
|
307
|
+
/** The `created` timestamp as the server sent it, when present. */
|
|
308
|
+
created?: string;
|
|
309
|
+
metadata?: unknown;
|
|
310
|
+
/** The message as received, for tool inputs and outputs or provider fields. */
|
|
311
|
+
raw: GrotMessage;
|
|
312
|
+
/** The text parts joined by newlines, without reasoning, tools or empty parts. */
|
|
313
|
+
text: string;
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* A topic message, discriminated by `kind`. A role this client does not know parses as `unknown`; it does not throw. Unknown part types stay readable too. A value that is not an object, or whose `id` or `role` is not a string, throws.
|
|
317
|
+
*
|
|
318
|
+
* @experimental This API is under active development and may change in future releases.
|
|
319
|
+
*/
|
|
320
|
+
export type ParsedGrotMessage = (ParsedGrotMessageBase & {
|
|
321
|
+
kind: 'user';
|
|
322
|
+
}) | (ParsedGrotMessageBase & {
|
|
323
|
+
kind: 'assistant';
|
|
324
|
+
}) | (ParsedGrotMessageBase & {
|
|
325
|
+
kind: 'system';
|
|
326
|
+
}) | (ParsedGrotMessageBase & {
|
|
327
|
+
kind: 'unknown';
|
|
328
|
+
role: string;
|
|
329
|
+
});
|
|
330
|
+
export {};
|
|
331
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/grots/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,gBAAgB,CAAC;CACpC;AAED,4FAA4F;AAC5F,MAAM,WAAW,gBAAgB;IAC/B,kHAAkH;IAClH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2GAA2G;IAC3G,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,sGAAsG;IACtG,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;GAIG;AACH,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wGAAwG;IACxG,KAAK,CAAC,EAAE,MAAM,CAAC;I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,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,CAAC;AAEpE,UAAU,qBAAqB;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,eAAe,EAAE,CAAC;IACzB,mEAAmE;IACnE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,+EAA+E;IAC/E,GAAG,EAAE,WAAW,CAAC;IACjB,kFAAkF;IAClF,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GACzB,CAAC,qBAAqB,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,GAC1C,CAAC,qBAAqB,GAAG;IAAE,IAAI,EAAE,WAAW,CAAA;CAAE,CAAC,GAC/C,CAAC,qBAAqB,GAAG;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,CAAC,GAC5C,CAAC,qBAAqB,GAAG;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,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,12 @@ export * from './sidebar';
|
|
|
6
6
|
export * from './components';
|
|
7
7
|
export * from './inline';
|
|
8
8
|
export * from './lens';
|
|
9
|
+
export * from './investigations';
|
|
10
|
+
export * from './grots';
|
|
9
11
|
export * from './terms';
|
|
10
12
|
export * from './tools';
|
|
11
13
|
export * from './limits';
|
|
12
14
|
export * from './k6';
|
|
15
|
+
export * from './pathfinder';
|
|
13
16
|
export * from './extension';
|
|
14
17
|
//# 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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