@grafana/assistant 0.1.28 → 0.1.30
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 +111 -0
- package/dist/context/page.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/lens/index.d.ts +4 -0
- package/dist/lens/index.d.ts.map +1 -0
- package/dist/lens/investigationLens.d.ts +54 -0
- package/dist/lens/investigationLens.d.ts.map +1 -0
- package/dist/lens/types.d.ts +67 -0
- package/dist/lens/types.d.ts.map +1 -0
- package/dist/lens/useInvestigationThroughLens.d.ts +67 -0
- package/dist/lens/useInvestigationThroughLens.d.ts.map +1 -0
- package/dist/tools/types.d.ts +5 -0
- package/dist/tools/types.d.ts.map +1 -1
- package/package.json +4 -1
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { useInvestigationThroughLens } from './useInvestigationThroughLens';
|
|
2
|
+
export type { InvestigationLensError, InvestigationLensErrorCode, InvestigationLensState, UseInvestigationThroughLensOptions, UseInvestigationThroughLensResult, } from './types';
|
|
3
|
+
export { setInvestigationLensImplementation, setInvestigationLensInitializer, getInvestigationLensImplementation, ensureInvestigationLensInitialized, toInvestigationLensError, InvestigationLensRequestError, type InvestigationLensImplementation, type InvestigationLensInitializer, type InvestigationLensRequest, } from './investigationLens';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lens/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,YAAY,EACV,sBAAsB,EACtB,0BAA0B,EAC1B,sBAAsB,EACtB,kCAAkC,EAClC,iCAAiC,GAClC,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,kCAAkC,EAClC,+BAA+B,EAC/B,kCAAkC,EAClC,kCAAkC,EAClC,wBAAwB,EACxB,6BAA6B,EAC7B,KAAK,+BAA+B,EACpC,KAAK,4BAA4B,EACjC,KAAK,wBAAwB,GAC9B,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { InvestigationLensError, InvestigationLensErrorCode } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Request passed to the lens implementation registered by the Grafana
|
|
4
|
+
* Assistant plugin.
|
|
5
|
+
*/
|
|
6
|
+
export interface InvestigationLensRequest {
|
|
7
|
+
investigationId: string;
|
|
8
|
+
/** JSON Schema describing the shape of the desired structured view. */
|
|
9
|
+
schema: unknown;
|
|
10
|
+
/** Attribution for the generation, e.g. `'grafana-irm/incident-detail'`. */
|
|
11
|
+
origin: string;
|
|
12
|
+
/** When true, bypass the cached result and regenerate. */
|
|
13
|
+
refresh?: boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* The lens implementation provided by the Grafana Assistant plugin. Resolves
|
|
17
|
+
* with data conforming to the request's schema, or rejects with an error
|
|
18
|
+
* carrying an {@link InvestigationLensErrorCode} `code` property.
|
|
19
|
+
*/
|
|
20
|
+
export type InvestigationLensImplementation = (request: InvestigationLensRequest) => Promise<unknown>;
|
|
21
|
+
export type InvestigationLensInitializer = () => Promise<void>;
|
|
22
|
+
/**
|
|
23
|
+
* Typed error the lens implementation throws to signal a specific failure
|
|
24
|
+
* mode. Consumers should not need this class — the hook converts failures to
|
|
25
|
+
* plain {@link InvestigationLensError} values. Conversion is structural (it
|
|
26
|
+
* reads the `code` property), so it works even when the host plugin and the
|
|
27
|
+
* assistant plugin bundle different copies of this package.
|
|
28
|
+
*/
|
|
29
|
+
export declare class InvestigationLensRequestError extends Error {
|
|
30
|
+
readonly code: InvestigationLensErrorCode;
|
|
31
|
+
constructor(code: InvestigationLensErrorCode, message: string);
|
|
32
|
+
}
|
|
33
|
+
/** Converts any thrown value into a plain, typed lens error. */
|
|
34
|
+
export declare function toInvestigationLensError(err: unknown): InvestigationLensError;
|
|
35
|
+
declare global {
|
|
36
|
+
interface Window {
|
|
37
|
+
[key: string]: any;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
export declare function setInvestigationLensImplementation(fn: InvestigationLensImplementation): void;
|
|
41
|
+
/**
|
|
42
|
+
* Register a lazy initializer that is called on first use. The Grafana
|
|
43
|
+
* Assistant plugin registers this at bootstrap so the heavy implementation
|
|
44
|
+
* loads only when a consumer actually requests a lens view.
|
|
45
|
+
*/
|
|
46
|
+
export declare function setInvestigationLensInitializer(fn: InvestigationLensInitializer): void;
|
|
47
|
+
/**
|
|
48
|
+
* Ensure the lens implementation is initialized, invoking the registered
|
|
49
|
+
* initializer on first use. Throws an `unavailable` lens error when no
|
|
50
|
+
* initializer is registered (assistant plugin missing or too old).
|
|
51
|
+
*/
|
|
52
|
+
export declare function ensureInvestigationLensInitialized(): Promise<void>;
|
|
53
|
+
export declare function getInvestigationLensImplementation(): InvestigationLensImplementation;
|
|
54
|
+
//# sourceMappingURL=investigationLens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"investigationLens.d.ts","sourceRoot":"","sources":["../../src/lens/investigationLens.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAElF;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IACvC,eAAe,EAAE,MAAM,CAAC;IACxB,uEAAuE;IACvE,MAAM,EAAE,OAAO,CAAC;IAChB,4EAA4E;IAC5E,MAAM,EAAE,MAAM,CAAC;IACf,0DAA0D;IAC1D,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;GAIG;AACH,MAAM,MAAM,+BAA+B,GAAG,CAAC,OAAO,EAAE,wBAAwB,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;AACtG,MAAM,MAAM,4BAA4B,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;AAc/D;;;;;;GAMG;AACH,qBAAa,6BAA8B,SAAQ,KAAK;aAEpC,IAAI,EAAE,0BAA0B;gBAAhC,IAAI,EAAE,0BAA0B,EAChD,OAAO,EAAE,MAAM;CAKlB;AAED,gEAAgE;AAChE,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,OAAO,GAAG,sBAAsB,CAK7E;AAGD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;KACpB;CACF;AASD,wBAAgB,kCAAkC,CAAC,EAAE,EAAE,+BAA+B,GAAG,IAAI,CAS5F;AAED;;;;GAIG;AACH,wBAAgB,+BAA+B,CAAC,EAAE,EAAE,4BAA4B,GAAG,IAAI,CAStF;AAED;;;;GAIG;AACH,wBAAsB,kCAAkC,IAAI,OAAO,CAAC,IAAI,CAAC,CAgCxE;AAED,wBAAgB,kCAAkC,IAAI,+BAA+B,CASpF"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Error codes surfaced by `useInvestigationThroughLens`.
|
|
3
|
+
*
|
|
4
|
+
* - `unavailable` — the Grafana Assistant plugin is not loaded (or too old to
|
|
5
|
+
* provide the lens implementation).
|
|
6
|
+
* - `no_report` — the investigation does not exist or has not produced a
|
|
7
|
+
* report yet.
|
|
8
|
+
* - `permission_denied` — the current user cannot read the investigation.
|
|
9
|
+
* - `validation_failed` — the model output did not conform to the requested
|
|
10
|
+
* JSON Schema (after one corrective retry).
|
|
11
|
+
* - `llm_error` — the generation request itself failed (network, limits, or
|
|
12
|
+
* provider errors).
|
|
13
|
+
*/
|
|
14
|
+
export type InvestigationLensErrorCode = 'unavailable' | 'no_report' | 'permission_denied' | 'validation_failed' | 'llm_error';
|
|
15
|
+
export interface InvestigationLensError {
|
|
16
|
+
code: InvestigationLensErrorCode;
|
|
17
|
+
/** Human-readable description, safe to show to users. */
|
|
18
|
+
message: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Discriminated result state: `data` and `error` can never coexist.
|
|
22
|
+
*/
|
|
23
|
+
export type InvestigationLensState<T> = {
|
|
24
|
+
status: 'loading';
|
|
25
|
+
data?: undefined;
|
|
26
|
+
error?: undefined;
|
|
27
|
+
} | {
|
|
28
|
+
status: 'success';
|
|
29
|
+
data: T;
|
|
30
|
+
error?: undefined;
|
|
31
|
+
} | {
|
|
32
|
+
status: 'error';
|
|
33
|
+
data?: undefined;
|
|
34
|
+
error: InvestigationLensError;
|
|
35
|
+
};
|
|
36
|
+
export type UseInvestigationThroughLensResult<T> = InvestigationLensState<T> & {
|
|
37
|
+
/** Regenerates the view, bypassing the cached result for this schema + report. */
|
|
38
|
+
refresh: () => void;
|
|
39
|
+
};
|
|
40
|
+
export interface UseInvestigationThroughLensOptions {
|
|
41
|
+
/**
|
|
42
|
+
* Attribution for the generation, e.g. `'grafana-irm/incident-detail'`.
|
|
43
|
+
* Follows the same convention as the inline assistant's `origin`: the first
|
|
44
|
+
* path segment identifies the integration.
|
|
45
|
+
*/
|
|
46
|
+
origin: string;
|
|
47
|
+
/**
|
|
48
|
+
* When false, the hook stays in the `loading` state and does not generate.
|
|
49
|
+
* Useful to defer generation until a precondition is met (e.g. the
|
|
50
|
+
* investigation has finished streaming its report).
|
|
51
|
+
*
|
|
52
|
+
* @default true
|
|
53
|
+
*/
|
|
54
|
+
enabled?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* When true, the generation triggered by `enabled` transitioning from false
|
|
57
|
+
* to true bypasses cached results (one-shot, like `refresh()`). Set this
|
|
58
|
+
* when the underlying report may have changed while the hook was disabled —
|
|
59
|
+
* e.g. `enabled` gates on the report streaming, so caches primed before the
|
|
60
|
+
* stream settled would otherwise serve a summary of the old report. First
|
|
61
|
+
* mounts with `enabled: true` use the normal cached path.
|
|
62
|
+
*
|
|
63
|
+
* @default false
|
|
64
|
+
*/
|
|
65
|
+
refreshOnEnable?: boolean;
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/lens/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,0BAA0B,GAClC,aAAa,GACb,WAAW,GACX,mBAAmB,GACnB,mBAAmB,GACnB,WAAW,CAAC;AAEhB,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,0BAA0B,CAAC;IACjC,yDAAyD;IACzD,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,MAAM,sBAAsB,CAAC,CAAC,IAChC;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,IAAI,CAAC,EAAE,SAAS,CAAC;IAAC,KAAK,CAAC,EAAE,SAAS,CAAA;CAAE,GAC1D;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,CAAC,CAAC;IAAC,KAAK,CAAC,EAAE,SAAS,CAAA;CAAE,GACjD;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,sBAAsB,CAAA;CAAE,CAAC;AAEzE,MAAM,MAAM,iCAAiC,CAAC,CAAC,IAAI,sBAAsB,CAAC,CAAC,CAAC,GAAG;IAC7E,kFAAkF;IAClF,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,MAAM,WAAW,kCAAkC;IACjD;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;;;;;OASG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { FromSchema, JSONSchema } from 'json-schema-to-ts';
|
|
2
|
+
import type { UseInvestigationThroughLensOptions, UseInvestigationThroughLensResult } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Derives a structured, LLM-generated view of an investigation's report,
|
|
5
|
+
* shaped by a caller-provided JSON Schema. Declarative: generation runs on
|
|
6
|
+
* mount and whenever the schema or investigation changes; results are cached
|
|
7
|
+
* by the Grafana Assistant plugin per (investigation, schema, report
|
|
8
|
+
* content), so remounts don't regenerate for an unchanged report.
|
|
9
|
+
*
|
|
10
|
+
* Field `description`s are per-field instructions to the model — that is the
|
|
11
|
+
* steering mechanism. Deterministic facts (ids, titles, statuses, timestamps,
|
|
12
|
+
* links) are provided to the model verbatim and copied through rather than
|
|
13
|
+
* generated, so reserve schema fields for genuine synthesis from the report.
|
|
14
|
+
*
|
|
15
|
+
* Declare the schema with `as const` to get a fully typed `data` inferred
|
|
16
|
+
* from the schema (via `json-schema-to-ts`):
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```typescript
|
|
20
|
+
* const schema = {
|
|
21
|
+
* type: 'object',
|
|
22
|
+
* properties: {
|
|
23
|
+
* headline: {
|
|
24
|
+
* type: 'string',
|
|
25
|
+
* description: 'One sentence describing the incident for an executive audience, max 80 characters.',
|
|
26
|
+
* },
|
|
27
|
+
* followUps: {
|
|
28
|
+
* type: 'array',
|
|
29
|
+
* description: 'Concrete follow-up actions to prevent recurrence.',
|
|
30
|
+
* items: {
|
|
31
|
+
* type: 'object',
|
|
32
|
+
* properties: {
|
|
33
|
+
* action: { type: 'string' },
|
|
34
|
+
* urgency: { type: 'string', enum: ['now', 'this-week', 'backlog'] },
|
|
35
|
+
* },
|
|
36
|
+
* required: ['action', 'urgency'],
|
|
37
|
+
* additionalProperties: false,
|
|
38
|
+
* },
|
|
39
|
+
* },
|
|
40
|
+
* },
|
|
41
|
+
* required: ['headline', 'followUps'],
|
|
42
|
+
* additionalProperties: false,
|
|
43
|
+
* } as const;
|
|
44
|
+
*
|
|
45
|
+
* function IncidentReview({ investigationId }: { investigationId: string }) {
|
|
46
|
+
* const lens = useInvestigationThroughLens(schema, investigationId, {
|
|
47
|
+
* origin: 'grafana-irm/incident-review',
|
|
48
|
+
* });
|
|
49
|
+
*
|
|
50
|
+
* if (lens.status === 'loading') return <Spinner />;
|
|
51
|
+
* if (lens.status === 'error') return <span>{lens.error.message}</span>;
|
|
52
|
+
* // lens.data.followUps[0].urgency is 'now' | 'this-week' | 'backlog'
|
|
53
|
+
* return <h3>{lens.data.headline}</h3>;
|
|
54
|
+
* }
|
|
55
|
+
* ```
|
|
56
|
+
*
|
|
57
|
+
* Requires the Grafana Assistant plugin; when it is missing or outdated the
|
|
58
|
+
* hook resolves to an `error` state with code `unavailable` — it never throws
|
|
59
|
+
* into the host's render.
|
|
60
|
+
*
|
|
61
|
+
* Note on `enabled` gating: re-enabling serves cached results by default. If
|
|
62
|
+
* the report may have changed while the hook was disabled — e.g. `enabled`
|
|
63
|
+
* gates on the report streaming — set `refreshOnEnable: true` so the fetch
|
|
64
|
+
* triggered by the false → true transition bypasses the caches once.
|
|
65
|
+
*/
|
|
66
|
+
export declare function useInvestigationThroughLens<S extends JSONSchema, T = FromSchema<S>>(schema: S, investigationId: string, options: UseInvestigationThroughLensOptions): UseInvestigationThroughLensResult<T>;
|
|
67
|
+
//# sourceMappingURL=useInvestigationThroughLens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useInvestigationThroughLens.d.ts","sourceRoot":"","sources":["../../src/lens/useInvestigationThroughLens.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAOhE,OAAO,KAAK,EAEV,kCAAkC,EAClC,iCAAiC,EAClC,MAAM,SAAS,CAAC;AAEjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AACH,wBAAgB,2BAA2B,CAAC,CAAC,SAAS,UAAU,EAAE,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,EACjF,MAAM,EAAE,CAAC,EACT,eAAe,EAAE,MAAM,EACvB,OAAO,EAAE,kCAAkC,GAC1C,iCAAiC,CAAC,CAAC,CAAC,CAmEtC"}
|
package/dist/tools/types.d.ts
CHANGED
|
@@ -113,6 +113,11 @@ export interface Tool {
|
|
|
113
113
|
* saving context space (~200-400 tokens per tool).
|
|
114
114
|
*/
|
|
115
115
|
deferLoading?: boolean;
|
|
116
|
+
/**
|
|
117
|
+
* When true, ask providers that support strict tool use to constrain tool inputs
|
|
118
|
+
* to the advertised JSON Schema.
|
|
119
|
+
*/
|
|
120
|
+
strict?: boolean;
|
|
116
121
|
/**
|
|
117
122
|
* When true, the backend coalesces and emits in-flight tool-input fragments
|
|
118
123
|
* (`message.tool.input.delta` SSE events) as the LLM streams them, before the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/tools/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AAED;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,WAAW,EAAE,kBAAkB,EAAE,KAAK,OAAO,CAAC;AAEpF;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB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AQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,UAAU,CAAC;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grafana/assistant",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.30",
|
|
4
4
|
"description": "Type definitions and helper functions for Grafana Assistant",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -68,5 +68,8 @@
|
|
|
68
68
|
"@grafana/ui": ">=12.1.0",
|
|
69
69
|
"react": ">=18.0.0",
|
|
70
70
|
"rxjs": ">=7.0.0"
|
|
71
|
+
},
|
|
72
|
+
"dependencies": {
|
|
73
|
+
"json-schema-to-ts": "^3.1.1"
|
|
71
74
|
}
|
|
72
75
|
}
|