@jupiterone/jupiterone-mcp 2.1.1 → 2.3.0
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 +18 -2
- package/dist/client/graphql/queries.d.ts +48 -1
- package/dist/client/graphql/queries.d.ts.map +1 -1
- package/dist/client/graphql/queries.js +329 -1
- package/dist/client/graphql/queries.js.map +1 -1
- package/dist/client/jupiterone-client.d.ts +8 -0
- package/dist/client/jupiterone-client.d.ts.map +1 -1
- package/dist/client/jupiterone-client.js +13 -0
- package/dist/client/jupiterone-client.js.map +1 -1
- package/dist/client/services/threat-service.d.ts +31 -0
- package/dist/client/services/threat-service.d.ts.map +1 -0
- package/dist/client/services/threat-service.js +72 -0
- package/dist/client/services/threat-service.js.map +1 -0
- package/dist/generated/description-map.d.ts.map +1 -1
- package/dist/generated/description-map.js +602 -14
- package/dist/generated/description-map.js.map +1 -1
- package/dist/server/mcp-server.d.ts.map +1 -1
- package/dist/server/mcp-server.js +51 -1
- package/dist/server/mcp-server.js.map +1 -1
- package/dist/server/tools/alerts.d.ts.map +1 -1
- package/dist/server/tools/alerts.js +2 -5
- package/dist/server/tools/alerts.js.map +1 -1
- package/dist/server/tools/dashboard-layout.d.ts +80 -3
- package/dist/server/tools/dashboard-layout.d.ts.map +1 -1
- package/dist/server/tools/dashboard-layout.js +220 -15
- package/dist/server/tools/dashboard-layout.js.map +1 -1
- package/dist/server/tools/dashboards.d.ts.map +1 -1
- package/dist/server/tools/dashboards.js +379 -10
- package/dist/server/tools/dashboards.js.map +1 -1
- package/dist/server/tools/errors.d.ts +61 -10
- package/dist/server/tools/errors.d.ts.map +1 -1
- package/dist/server/tools/errors.js +201 -10
- package/dist/server/tools/errors.js.map +1 -1
- package/dist/server/tools/index.d.ts.map +1 -1
- package/dist/server/tools/index.js +2 -0
- package/dist/server/tools/index.js.map +1 -1
- package/dist/server/tools/integrations.d.ts.map +1 -1
- package/dist/server/tools/integrations.js +15 -4
- package/dist/server/tools/integrations.js.map +1 -1
- package/dist/server/tools/j1ql.d.ts.map +1 -1
- package/dist/server/tools/j1ql.js +72 -4
- package/dist/server/tools/j1ql.js.map +1 -1
- package/dist/server/tools/rules.d.ts.map +1 -1
- package/dist/server/tools/rules.js +57 -6
- package/dist/server/tools/rules.js.map +1 -1
- package/dist/server/tools/telemetry.d.ts +7 -1
- package/dist/server/tools/telemetry.d.ts.map +1 -1
- package/dist/server/tools/telemetry.js.map +1 -1
- package/dist/server/tools/threat.d.ts +3 -0
- package/dist/server/tools/threat.d.ts.map +1 -0
- package/dist/server/tools/threat.js +284 -0
- package/dist/server/tools/threat.js.map +1 -0
- package/dist/server/tools/types.d.ts +5 -0
- package/dist/server/tools/types.d.ts.map +1 -1
- package/dist/server/tools/types.js +7 -1
- package/dist/server/tools/types.js.map +1 -1
- package/dist/server/tools/usage.d.ts +13 -3
- package/dist/server/tools/usage.d.ts.map +1 -1
- package/dist/server/tools/usage.js +186 -7
- package/dist/server/tools/usage.js.map +1 -1
- package/dist/server/tools/value-probe.d.ts +85 -0
- package/dist/server/tools/value-probe.d.ts.map +1 -0
- package/dist/server/tools/value-probe.js +473 -0
- package/dist/server/tools/value-probe.js.map +1 -0
- package/dist/server/tools/widget-config-lint.d.ts +39 -0
- package/dist/server/tools/widget-config-lint.d.ts.map +1 -0
- package/dist/server/tools/widget-config-lint.js +290 -0
- package/dist/server/tools/widget-config-lint.js.map +1 -0
- package/dist/server/tools/widget-preflight.d.ts +63 -0
- package/dist/server/tools/widget-preflight.d.ts.map +1 -0
- package/dist/server/tools/widget-preflight.js +238 -0
- package/dist/server/tools/widget-preflight.js.map +1 -0
- package/dist/server/tools/widget-render-contract.d.ts +134 -0
- package/dist/server/tools/widget-render-contract.d.ts.map +1 -0
- package/dist/server/tools/widget-render-contract.js +421 -0
- package/dist/server/tools/widget-render-contract.js.map +1 -0
- package/dist/server/tools/widget-settings-keys.d.ts +51 -0
- package/dist/server/tools/widget-settings-keys.d.ts.map +1 -0
- package/dist/server/tools/widget-settings-keys.js +152 -0
- package/dist/server/tools/widget-settings-keys.js.map +1 -0
- package/dist/types/jupiterone.d.ts +139 -0
- package/dist/types/jupiterone.d.ts.map +1 -1
- package/dist/utils/j1ql-filters.d.ts +48 -0
- package/dist/utils/j1ql-filters.d.ts.map +1 -0
- package/dist/utils/j1ql-filters.js +184 -0
- package/dist/utils/j1ql-filters.js.map +1 -0
- package/dist/utils/j1ql-validator.d.ts +0 -5
- package/dist/utils/j1ql-validator.d.ts.map +1 -1
- package/dist/utils/j1ql-validator.js +27 -6
- package/dist/utils/j1ql-validator.js.map +1 -1
- package/node_modules/dtrace-provider/build/Makefile +1 -1
- package/package.json +1 -1
- package/dist/utils/description-loader.d.ts +0 -2
- package/dist/utils/description-loader.d.ts.map +0 -1
- package/dist/utils/description-loader.js +0 -17
- package/dist/utils/description-loader.js.map +0 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Query } from '../../types/jupiterone.js';
|
|
2
2
|
import { type J1QLValidator } from '../../utils/j1ql-validator.js';
|
|
3
3
|
import type { ToolResult } from './types.js';
|
|
4
|
+
import { type WidgetContractCheck } from './widget-render-contract.js';
|
|
4
5
|
/**
|
|
5
6
|
* The HTTP status of an upstream authentication/authorization rejection, or `null` for any other
|
|
6
7
|
* error. An account can stay in `list-accounts` (membership) yet fail live authorization — revoked,
|
|
@@ -16,6 +17,8 @@ export interface AccessDeniedContext {
|
|
|
16
17
|
hasAccountDiscovery: boolean;
|
|
17
18
|
/** The fixed account this instance is bound to (URL subdomain / env config), when single-tenant. */
|
|
18
19
|
pinnedAccountId?: string;
|
|
20
|
+
/** Tool-supplied sentence for a tool whose API gates on more than account membership. */
|
|
21
|
+
hint?: string;
|
|
19
22
|
}
|
|
20
23
|
/**
|
|
21
24
|
* Agent-facing message for an access-denied upstream response. Three shapes:
|
|
@@ -23,6 +26,9 @@ export interface AccessDeniedContext {
|
|
|
23
26
|
* steer to list-accounts + fixing the connector URL. Re-authenticating cannot fix a bad binding.
|
|
24
27
|
* - pinned, no discovery (stdio env account): point at the configured account and credentials.
|
|
25
28
|
* - multi-tenant: per-call accountId — steer to list-accounts and a different accountId.
|
|
29
|
+
*
|
|
30
|
+
* A tool that gates on more than account membership appends its own `hint`, so a 403 from an
|
|
31
|
+
* unentitled account is not read as a revoked one.
|
|
26
32
|
*/
|
|
27
33
|
export declare function accessDeniedMessage(statusCode: number, context: AccessDeniedContext): string;
|
|
28
34
|
export declare function accessDeniedResult(statusCode: number, context: AccessDeniedContext): ToolResult;
|
|
@@ -32,15 +38,21 @@ export declare function accessDeniedResult(statusCode: number, context: AccessDe
|
|
|
32
38
|
* errors are framed by the registration chokepoint before this is reached.
|
|
33
39
|
*/
|
|
34
40
|
export declare function toErrorResponse(error: unknown, context: string): ToolResult;
|
|
41
|
+
/** One query the static parse gate refused, named as the caller labelled it. */
|
|
42
|
+
export interface QueryValidationFailure {
|
|
43
|
+
queryName: string;
|
|
44
|
+
error: string;
|
|
45
|
+
suggestion: string;
|
|
46
|
+
}
|
|
35
47
|
/**
|
|
36
48
|
* Statically validate each J1QL query in a rule/widget definition before the create/update call.
|
|
37
49
|
* Local parse only (see J1QLValidator.validateQuery) — instant, no backend round-trips.
|
|
50
|
+
*
|
|
51
|
+
* A query object can carry a second query: `drilldownQuery` is J1QL the widget stores and runs when
|
|
52
|
+
* a reader clicks a data point. An invalid one fails at that click, days later, with nothing in the
|
|
53
|
+
* create response to point at it — and the parse is already loaded here, so it costs nothing.
|
|
38
54
|
*/
|
|
39
|
-
export declare function validateQueries(queries: Query[] | undefined, validator: J1QLValidator):
|
|
40
|
-
queryName: string;
|
|
41
|
-
error: string;
|
|
42
|
-
suggestion: string;
|
|
43
|
-
}>;
|
|
55
|
+
export declare function validateQueries(queries: Query[] | undefined, validator: J1QLValidator): QueryValidationFailure[];
|
|
44
56
|
/**
|
|
45
57
|
* Tool result for an execute-j1ql-query call rejected by the static parse gate. States plainly
|
|
46
58
|
* that nothing ran — retrying with a fixed query is free and instant.
|
|
@@ -50,11 +62,50 @@ export declare function invalidQueryResponse(validation: {
|
|
|
50
62
|
suggestion?: string;
|
|
51
63
|
}): ToolResult;
|
|
52
64
|
/** Tool result returned (as a non-throwing outcome) when pre-create query validation fails. */
|
|
53
|
-
export declare function createValidationErrorResponse(validationResults:
|
|
54
|
-
queryName: string;
|
|
55
|
-
error: string;
|
|
56
|
-
suggestion: string;
|
|
57
|
-
}>): ToolResult;
|
|
65
|
+
export declare function createValidationErrorResponse(validationResults: QueryValidationFailure[]): ToolResult;
|
|
58
66
|
/** Validator-aware error for execute-j1ql-query: maps execution errors to actionable suggestions. */
|
|
59
67
|
export declare function createQueryErrorResponse(error: unknown, query: string, validator: J1QLValidator): ToolResult;
|
|
68
|
+
/** A widget query whose RETURN columns cannot render in the chosen chart type. */
|
|
69
|
+
export interface WidgetContractViolation {
|
|
70
|
+
queryName: string;
|
|
71
|
+
check: WidgetContractCheck;
|
|
72
|
+
/**
|
|
73
|
+
* Set when the widget carries no runnable query at all, so there is no RETURN clause to fix.
|
|
74
|
+
* `markdown` is the only widget type that renders without one.
|
|
75
|
+
*/
|
|
76
|
+
queryless?: true;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Check each widget query against its chart type's column contract, before the create/update call.
|
|
80
|
+
*
|
|
81
|
+
* The sibling of `validateQueries`: that one catches queries the parser rejects, this one catches
|
|
82
|
+
* queries the parser accepts but the renderer cannot draw. Both are local — no backend round-trip.
|
|
83
|
+
* Returns only violations; advisory gaps (`missingRecommended`) are reported by the post-create
|
|
84
|
+
* render preflight instead, because they never justify refusing the widget.
|
|
85
|
+
*
|
|
86
|
+
* The whole array is what decides some of the contract, not each query in isolation: a pie's `name`
|
|
87
|
+
* column is required on a lone query and irrelevant on several, since a multi-query chart labels
|
|
88
|
+
* its slices by query name. Passing the count keeps that decision here, where the widget's shape is
|
|
89
|
+
* known, rather than at every call site.
|
|
90
|
+
*/
|
|
91
|
+
export declare function checkWidgetQueries(chartType: string | undefined, queries: Query[] | undefined): WidgetContractViolation[];
|
|
92
|
+
/**
|
|
93
|
+
* Advisory notes for widget queries that pass the gate but are shaped oddly for their chart type.
|
|
94
|
+
*
|
|
95
|
+
* EACH query on a `number` widget is documented to return a single `value`, and the field report
|
|
96
|
+
* behind TD-9016 was that extras "can break" it — but nothing has confirmed what the current
|
|
97
|
+
* renderer does with them, so this warns and does not block.
|
|
98
|
+
*
|
|
99
|
+
* The count of queries is not what is being judged. A number widget legitimately carries several —
|
|
100
|
+
* that is how percentage mode divides one query's total by another's — so the note has to say
|
|
101
|
+
* "columns" where it means columns, or it teaches an agent to collapse a correct widget.
|
|
102
|
+
*/
|
|
103
|
+
export declare function widgetAdvisoryNotes(chartType: string | undefined, queries: Query[] | undefined): string[];
|
|
104
|
+
/**
|
|
105
|
+
* Tool result for a widget rejected by the column-contract gate.
|
|
106
|
+
*
|
|
107
|
+
* Recovery stays in-band: the widget was not created, and the response carries a ready-to-run
|
|
108
|
+
* corrected query wherever one could be derived and re-verified — retrying is free and instant.
|
|
109
|
+
*/
|
|
110
|
+
export declare function widgetContractErrorResponse(chartType: string, violations: WidgetContractViolation[], operation?: 'create' | 'update'): ToolResult;
|
|
60
111
|
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/server/tools/errors.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAmB,KAAK,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACpF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/server/tools/errors.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAmB,KAAK,aAAa,EAAE,MAAM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AU,CAYZ;AAED,qGAAqG;AACrG,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,OAAO,EACd,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,aAAa,GACvB,UAAU,CAiBZ;AAED,kFAAkF;AAClF,MAAM,WAAW,uBAAuB;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,mBAAmB,CAAC;IAC3B;;;OAGG;IACH,SAAS,CAAC,EAAE,IAAI,CAAC;CAClB;AA0BD;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,OAAO,EAAE,KAAK,EAAE,GAAG,SAAS,GAC3B,uBAAuB,EAAE,CAuB3B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,OAAO,EAAE,KAAK,EAAE,GAAG,SAAS,GAC3B,MAAM,EAAE,CAoBV;AAuCD;;;;;GAKG;AACH,wBAAgB,2BAA2B,CACzC,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,uBAAuB,EAAE,EACrC,SAAS,GAAE,QAAQ,GAAG,QAAmB,GACxC,UAAU,CA0CZ"}
|
|
@@ -8,8 +8,12 @@ exports.validateQueries = validateQueries;
|
|
|
8
8
|
exports.invalidQueryResponse = invalidQueryResponse;
|
|
9
9
|
exports.createValidationErrorResponse = createValidationErrorResponse;
|
|
10
10
|
exports.createQueryErrorResponse = createQueryErrorResponse;
|
|
11
|
+
exports.checkWidgetQueries = checkWidgetQueries;
|
|
12
|
+
exports.widgetAdvisoryNotes = widgetAdvisoryNotes;
|
|
13
|
+
exports.widgetContractErrorResponse = widgetContractErrorResponse;
|
|
11
14
|
const sanitize_error_js_1 = require("../../client/sanitize-error.js");
|
|
12
15
|
const j1ql_validator_js_1 = require("../../utils/j1ql-validator.js");
|
|
16
|
+
const widget_render_contract_js_1 = require("./widget-render-contract.js");
|
|
13
17
|
const ACCESS_DENIED_STATUS = new Set([401, 403]);
|
|
14
18
|
// GraphQL `extensions.code` values that mean authorization failed, mapped to the HTTP status they
|
|
15
19
|
// correspond to. The upstream frequently returns these inside an HTTP 200 (see JupiterOneApiError.code),
|
|
@@ -50,8 +54,15 @@ function accessDeniedStatus(error) {
|
|
|
50
54
|
* steer to list-accounts + fixing the connector URL. Re-authenticating cannot fix a bad binding.
|
|
51
55
|
* - pinned, no discovery (stdio env account): point at the configured account and credentials.
|
|
52
56
|
* - multi-tenant: per-call accountId — steer to list-accounts and a different accountId.
|
|
57
|
+
*
|
|
58
|
+
* A tool that gates on more than account membership appends its own `hint`, so a 403 from an
|
|
59
|
+
* unentitled account is not read as a revoked one.
|
|
53
60
|
*/
|
|
54
61
|
function accessDeniedMessage(statusCode, context) {
|
|
62
|
+
const base = accountAccessMessage(statusCode, context);
|
|
63
|
+
return context.hint ? `${base} ${context.hint}` : base;
|
|
64
|
+
}
|
|
65
|
+
function accountAccessMessage(statusCode, context) {
|
|
55
66
|
const { hasAccountDiscovery, pinnedAccountId } = context;
|
|
56
67
|
if (pinnedAccountId) {
|
|
57
68
|
const preamble = `Not authorized (HTTP ${statusCode}). This connection is pinned to account ` +
|
|
@@ -91,25 +102,38 @@ function toErrorResponse(error, context) {
|
|
|
91
102
|
isError: true,
|
|
92
103
|
};
|
|
93
104
|
}
|
|
105
|
+
/** Parse one J1QL string, or return null when there is nothing to parse and nothing wrong. */
|
|
106
|
+
function validateOne(queryName, query, validator) {
|
|
107
|
+
if (!query)
|
|
108
|
+
return null;
|
|
109
|
+
const validation = validator.validateQuery(query);
|
|
110
|
+
if (validation.isValid)
|
|
111
|
+
return null;
|
|
112
|
+
return {
|
|
113
|
+
queryName,
|
|
114
|
+
error: validation.error || 'Query validation failed',
|
|
115
|
+
suggestion: validation.suggestion || 'Please check the query syntax and try again',
|
|
116
|
+
};
|
|
117
|
+
}
|
|
94
118
|
/**
|
|
95
119
|
* Statically validate each J1QL query in a rule/widget definition before the create/update call.
|
|
96
120
|
* Local parse only (see J1QLValidator.validateQuery) — instant, no backend round-trips.
|
|
121
|
+
*
|
|
122
|
+
* A query object can carry a second query: `drilldownQuery` is J1QL the widget stores and runs when
|
|
123
|
+
* a reader clicks a data point. An invalid one fails at that click, days later, with nothing in the
|
|
124
|
+
* create response to point at it — and the parse is already loaded here, so it costs nothing.
|
|
97
125
|
*/
|
|
98
126
|
function validateQueries(queries, validator) {
|
|
99
127
|
if (!queries || !Array.isArray(queries))
|
|
100
128
|
return [];
|
|
101
129
|
const validationResults = [];
|
|
102
130
|
for (const queryObj of queries) {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
suggestion: validation.suggestion || 'Please check the query syntax and try again',
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
}
|
|
131
|
+
const queryName = queryObj.name || 'Unnamed query';
|
|
132
|
+
const failures = [
|
|
133
|
+
validateOne(queryName, queryObj.query, validator),
|
|
134
|
+
validateOne(`${queryName} (drilldownQuery)`, queryObj.drilldownQuery, validator),
|
|
135
|
+
];
|
|
136
|
+
validationResults.push(...failures.filter((failure) => failure !== null));
|
|
113
137
|
}
|
|
114
138
|
return validationResults;
|
|
115
139
|
}
|
|
@@ -160,4 +184,171 @@ function createQueryErrorResponse(error, query, validator) {
|
|
|
160
184
|
isError: true,
|
|
161
185
|
};
|
|
162
186
|
}
|
|
187
|
+
/**
|
|
188
|
+
* The queries on a widget that can draw anything: the ones carrying J1QL.
|
|
189
|
+
*
|
|
190
|
+
* An entry whose `query` is an empty string is accepted by the input schema and by the parse gate
|
|
191
|
+
* (there is nothing to parse and so nothing wrong), and it renders nothing. It must not count
|
|
192
|
+
* towards the widget's shape either: an empty second entry inflated `queryCount` to two, and a lone
|
|
193
|
+
* pie carrying one dodged the single-query `name` requirement — the undefined-donut, built through
|
|
194
|
+
* the gate that exists to stop it.
|
|
195
|
+
*/
|
|
196
|
+
function runnableQueries(queries) {
|
|
197
|
+
return queries.filter((queryObj) => typeof queryObj?.query === 'string' && queryObj.query.trim());
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Whether this chart type draws its queries' results, so a widget without one is a blank tile.
|
|
201
|
+
*
|
|
202
|
+
* `markdown` is the exception the whole check exists around: it renders its text and carries
|
|
203
|
+
* `queries: []` legitimately. `table` has no column contract to look up — it renders whatever
|
|
204
|
+
* columns it is given — but it still has nothing to render without a query.
|
|
205
|
+
*/
|
|
206
|
+
function needsAQuery(chartType) {
|
|
207
|
+
return chartType === 'table' || chartType in widget_render_contract_js_1.WIDGET_COLUMN_CONTRACT;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Check each widget query against its chart type's column contract, before the create/update call.
|
|
211
|
+
*
|
|
212
|
+
* The sibling of `validateQueries`: that one catches queries the parser rejects, this one catches
|
|
213
|
+
* queries the parser accepts but the renderer cannot draw. Both are local — no backend round-trip.
|
|
214
|
+
* Returns only violations; advisory gaps (`missingRecommended`) are reported by the post-create
|
|
215
|
+
* render preflight instead, because they never justify refusing the widget.
|
|
216
|
+
*
|
|
217
|
+
* The whole array is what decides some of the contract, not each query in isolation: a pie's `name`
|
|
218
|
+
* column is required on a lone query and irrelevant on several, since a multi-query chart labels
|
|
219
|
+
* its slices by query name. Passing the count keeps that decision here, where the widget's shape is
|
|
220
|
+
* known, rather than at every call site.
|
|
221
|
+
*/
|
|
222
|
+
function checkWidgetQueries(chartType, queries) {
|
|
223
|
+
if (!chartType || !Array.isArray(queries))
|
|
224
|
+
return [];
|
|
225
|
+
const runnable = runnableQueries(queries);
|
|
226
|
+
if (runnable.length === 0) {
|
|
227
|
+
if (!needsAQuery(chartType))
|
|
228
|
+
return [];
|
|
229
|
+
return [
|
|
230
|
+
{
|
|
231
|
+
queryName: '(none)',
|
|
232
|
+
check: { aliases: [], missingRequired: [], missingRecommended: [] },
|
|
233
|
+
queryless: true,
|
|
234
|
+
},
|
|
235
|
+
];
|
|
236
|
+
}
|
|
237
|
+
const violations = [];
|
|
238
|
+
for (const queryObj of runnable) {
|
|
239
|
+
const check = (0, widget_render_contract_js_1.checkWidgetContract)(chartType, queryObj.query, { queryCount: runnable.length });
|
|
240
|
+
if (check.missingRequired.length > 0) {
|
|
241
|
+
violations.push({ queryName: queryObj.name || 'Unnamed query', check });
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
return violations;
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* Advisory notes for widget queries that pass the gate but are shaped oddly for their chart type.
|
|
248
|
+
*
|
|
249
|
+
* EACH query on a `number` widget is documented to return a single `value`, and the field report
|
|
250
|
+
* behind TD-9016 was that extras "can break" it — but nothing has confirmed what the current
|
|
251
|
+
* renderer does with them, so this warns and does not block.
|
|
252
|
+
*
|
|
253
|
+
* The count of queries is not what is being judged. A number widget legitimately carries several —
|
|
254
|
+
* that is how percentage mode divides one query's total by another's — so the note has to say
|
|
255
|
+
* "columns" where it means columns, or it teaches an agent to collapse a correct widget.
|
|
256
|
+
*/
|
|
257
|
+
function widgetAdvisoryNotes(chartType, queries) {
|
|
258
|
+
if (!chartType || !Array.isArray(queries))
|
|
259
|
+
return [];
|
|
260
|
+
const notes = [];
|
|
261
|
+
const runnable = runnableQueries(queries);
|
|
262
|
+
for (const queryObj of runnable) {
|
|
263
|
+
const check = (0, widget_render_contract_js_1.checkWidgetContract)(chartType, queryObj.query, { queryCount: runnable.length });
|
|
264
|
+
const extras = check.extraColumns ?? [];
|
|
265
|
+
if (extras.length > 0) {
|
|
266
|
+
notes.push(`Query "${queryObj.name || 'unnamed'}" returns ${extras
|
|
267
|
+
.map((column) => `\`${column}\``)
|
|
268
|
+
.join(', ')} alongside the column a \`${chartType}\` widget reads. Each query on this ` +
|
|
269
|
+
'type is documented to return exactly one column; extras have been reported to break ' +
|
|
270
|
+
'the render. Drop the extra columns from this query — carrying SEVERAL queries is fine ' +
|
|
271
|
+
'and is how a percentage widget is built, but each one still returns only the column ' +
|
|
272
|
+
'the chart reads.');
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
return notes;
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* `RETURN <expression> AS x, <expression> AS y` — the shape to aim for, when no rewrite is safe.
|
|
279
|
+
*
|
|
280
|
+
* Built from the columns THIS widget needs, not the chart type's unconditional list: a column can be
|
|
281
|
+
* required for one widget and not another (`name` on a single-query pie), and a hint that omits the
|
|
282
|
+
* column the widget was just rejected for advises the shape that was rejected.
|
|
283
|
+
*/
|
|
284
|
+
function shapeHint(chartType, missingRequired) {
|
|
285
|
+
const contracted = widget_render_contract_js_1.WIDGET_COLUMN_CONTRACT[chartType]?.required ?? [];
|
|
286
|
+
const columns = [...new Set([...contracted, ...missingRequired])];
|
|
287
|
+
return `RETURN ${columns.map((column) => `<expression> AS ${column}`).join(', ')}`;
|
|
288
|
+
}
|
|
289
|
+
/** What one rejected query was asked for, what it declares, and the fix. */
|
|
290
|
+
function violationDetail(chartType, violation) {
|
|
291
|
+
const { queryName, check, queryless } = violation;
|
|
292
|
+
if (queryless) {
|
|
293
|
+
return (`A \`${chartType}\` widget draws what its queries return, and this one carries none that ` +
|
|
294
|
+
'hold any J1QL — either an empty `queries` array or entries whose `query` is an empty ' +
|
|
295
|
+
'string. It would be created as a blank tile. `markdown` is the only widget type that ' +
|
|
296
|
+
'renders without a query; every other type needs one in `config.queries`.');
|
|
297
|
+
}
|
|
298
|
+
const declared = check.aliases.map((alias) => alias ?? '(no alias)').join(', ') || '(none)';
|
|
299
|
+
const missing = check.missingRequired.map((column) => `\`${column}\``).join(', ');
|
|
300
|
+
const fix = check.correctedQuery
|
|
301
|
+
? `Use this query instead:\n${check.correctedQuery}`
|
|
302
|
+
: `Alias the columns the chart reads: ${shapeHint(chartType, check.missingRequired)}`;
|
|
303
|
+
return (`Query: ${queryName}\n` +
|
|
304
|
+
`A \`${chartType}\` widget renders ${missing}; this query returns ${declared}, ` +
|
|
305
|
+
`so the widget would draw nothing.\n${fix}`);
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* Tool result for a widget rejected by the column-contract gate.
|
|
309
|
+
*
|
|
310
|
+
* Recovery stays in-band: the widget was not created, and the response carries a ready-to-run
|
|
311
|
+
* corrected query wherever one could be derived and re-verified — retrying is free and instant.
|
|
312
|
+
*/
|
|
313
|
+
function widgetContractErrorResponse(chartType, violations, operation = 'create') {
|
|
314
|
+
const details = violations.map((violation) => violationDetail(chartType, violation));
|
|
315
|
+
// Naming the operation matters on the update path: telling a caller the widget "was not created"
|
|
316
|
+
// invites it to create one instead of retrying the update, which is how you get a duplicate.
|
|
317
|
+
const outcome = operation === 'update' ? 'Widget not updated' : 'Widget not created';
|
|
318
|
+
const anyCorrected = violations.some(({ check }) => check.correctedQuery);
|
|
319
|
+
// A widget with nothing to draw is a different instruction: there is no alias to rewrite, so
|
|
320
|
+
// telling the caller to fix its aliases would send it looking for a column that has no query.
|
|
321
|
+
const allQueryless = violations.every((violation) => violation.queryless);
|
|
322
|
+
const headline = allQueryless
|
|
323
|
+
? `a \`${chartType}\` widget cannot render without a query`
|
|
324
|
+
: `the ${violations.length > 1 ? 'queries' : 'query'} cannot render in a \`${chartType}\` widget`;
|
|
325
|
+
const closing = allQueryless
|
|
326
|
+
? 'Add the query this widget is meant to draw, confirm it returns rows with ' +
|
|
327
|
+
'execute-j1ql-query, then retry.'
|
|
328
|
+
: anyCorrected
|
|
329
|
+
? 'Run the corrected query through execute-j1ql-query to confirm it returns rows, then retry.'
|
|
330
|
+
: 'Rewrite the query with those aliases, confirm it returns rows with execute-j1ql-query, ' +
|
|
331
|
+
'then retry.';
|
|
332
|
+
return {
|
|
333
|
+
content: [
|
|
334
|
+
{
|
|
335
|
+
type: 'text',
|
|
336
|
+
text: `${outcome} — ${headline}:\n\n${details.join('\n\n')}\n\n${closing}`,
|
|
337
|
+
},
|
|
338
|
+
],
|
|
339
|
+
// Carried so the telemetry chokepoint can count rejections by chart type and missing column,
|
|
340
|
+
// rather than string-matching the message. Error results are exempt from output-schema
|
|
341
|
+
// validation, so this never reaches a client validator.
|
|
342
|
+
structuredContent: {
|
|
343
|
+
contractOk: false,
|
|
344
|
+
chartType,
|
|
345
|
+
missingRequired: [...new Set(violations.flatMap(({ check }) => check.missingRequired))],
|
|
346
|
+
// A rejection that ships a ready-to-run query and one that only names the shape are different
|
|
347
|
+
// events: the first should be followed by a successful retry, and whether it is is the only
|
|
348
|
+
// measure of whether the corrector is worth its complexity. Undistinguishable in the message.
|
|
349
|
+
correctionOffered: anyCorrected,
|
|
350
|
+
},
|
|
351
|
+
isError: true,
|
|
352
|
+
};
|
|
353
|
+
}
|
|
163
354
|
//# sourceMappingURL=errors.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../src/server/tools/errors.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../src/server/tools/errors.ts"],"names":[],"mappings":";;AAkCA,gDAYC;AAsBD,kDAGC;AA4BD,gDAKC;AAOD,0CAMC;AAiCD,0CAgBC;AAMD,oDAeC;AAGD,sEAcC;AAGD,4DAqBC;AAkDD,gDA0BC;AAaD,kDAuBC;AA6CD,kEA8CC;AA/aD,sEAAoE;AAEpE,qEAAoF;AAEpF,2EAKqC;AAErC,MAAM,oBAAoB,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;AAEjD,kGAAkG;AAClG,yGAAyG;AACzG,6CAA6C;AAC7C,MAAM,yBAAyB,GAA2B;IACxD,SAAS,EAAE,GAAG;IACd,eAAe,EAAE,GAAG;IACpB,YAAY,EAAE,GAAG;CAClB,CAAC;AAEF,iGAAiG;AACjG,qGAAqG;AACrG,MAAM,qBAAqB,GAAG,yDAAyD,CAAC;AAExF;;;;;;;GAOG;AACH,SAAgB,kBAAkB,CAAC,KAAc;IAC/C,IAAI,CAAC,CAAC,KAAK,YAAY,sCAAk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iCAAiC;QACnC,CAAC,CAAC,YAAY;YACZ,CAAC,CAAC,4FAA4F;YAC9F,CAAC,CAAC,yFAAyF;gBACzF,aAAa,CAAC;IAEpB,OAAO;QACL,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,GAAG,OAAO,MAAM,QAAQ,QAAQ,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,OAAO,EAAE;aAC3E;SACF;QACD,6FAA6F;QAC7F,uFAAuF;QACvF,wDAAwD;QACxD,iBAAiB,EAAE;YACjB,UAAU,EAAE,KAAK;YACjB,SAAS;YACT,eAAe,EAAE,CAAC,GAAG,IAAI,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC;YACvF,8FAA8F;YAC9F,4FAA4F;YAC5F,8FAA8F;YAC9F,iBAAiB,EAAE,YAAY;SAChC;QACD,OAAO,EAAE,IAAI;KACd,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/server/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/server/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AASjD,wDAAwD;AACxD,eAAO,MAAM,QAAQ,EAAE,cAAc,EAQpC,CAAC"}
|
|
@@ -7,6 +7,7 @@ const dashboards_js_1 = require("./dashboards.js");
|
|
|
7
7
|
const integrations_js_1 = require("./integrations.js");
|
|
8
8
|
const j1ql_js_1 = require("./j1ql.js");
|
|
9
9
|
const account_js_1 = require("./account.js");
|
|
10
|
+
const threat_js_1 = require("./threat.js");
|
|
10
11
|
/** Every tool the server exposes, grouped by domain. */
|
|
11
12
|
exports.allTools = [
|
|
12
13
|
...rules_js_1.ruleTools,
|
|
@@ -15,5 +16,6 @@ exports.allTools = [
|
|
|
15
16
|
...integrations_js_1.integrationTools,
|
|
16
17
|
...j1ql_js_1.j1qlTools,
|
|
17
18
|
...account_js_1.accountTools,
|
|
19
|
+
...threat_js_1.threatTools,
|
|
18
20
|
];
|
|
19
21
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/server/tools/index.ts"],"names":[],"mappings":";;;AACA,yCAAuC;AACvC,2CAAyC;AACzC,mDAAiD;AACjD,uDAAqD;AACrD,uCAAsC;AACtC,6CAA4C;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/server/tools/index.ts"],"names":[],"mappings":";;;AACA,yCAAuC;AACvC,2CAAyC;AACzC,mDAAiD;AACjD,uDAAqD;AACrD,uCAAsC;AACtC,6CAA4C;AAC5C,2CAA0C;AAE1C,wDAAwD;AAC3C,QAAA,QAAQ,GAAqB;IACxC,GAAG,oBAAS;IACZ,GAAG,sBAAU;IACb,GAAG,8BAAc;IACjB,GAAG,kCAAgB;IACnB,GAAG,mBAAS;IACZ,GAAG,yBAAY;IACf,GAAG,uBAAW;CACf,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integrations.d.ts","sourceRoot":"","sources":["../../../src/server/tools/integrations.ts"],"names":[],"mappings":"AAGA,OAAO,EAAyB,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"integrations.d.ts","sourceRoot":"","sources":["../../../src/server/tools/integrations.ts"],"names":[],"mappings":"AAGA,OAAO,EAAyB,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AA8BxE,eAAO,MAAM,gBAAgB,EAAE,cAAc,EAyO5C,CAAC"}
|
|
@@ -8,8 +8,16 @@ const types_js_1 = require("./types.js");
|
|
|
8
8
|
// Items vary by integration provider, so rows stay open records; the top-level + pageInfo are
|
|
9
9
|
// documented. Permissive enough to never false-reject real data.
|
|
10
10
|
const pageInfo = zod_1.z.any().optional();
|
|
11
|
-
const definitionsOutput = {
|
|
12
|
-
|
|
11
|
+
const definitionsOutput = {
|
|
12
|
+
total: zod_1.z.number(),
|
|
13
|
+
definitions: zod_1.z.array(zod_1.z.record(zod_1.z.string(), zod_1.z.any())),
|
|
14
|
+
pageInfo,
|
|
15
|
+
};
|
|
16
|
+
const instancesOutput = {
|
|
17
|
+
total: zod_1.z.number(),
|
|
18
|
+
instances: zod_1.z.array(zod_1.z.record(zod_1.z.string(), zod_1.z.any())),
|
|
19
|
+
pageInfo,
|
|
20
|
+
};
|
|
13
21
|
const jobsOutput = { total: zod_1.z.number(), jobs: zod_1.z.array(zod_1.z.record(zod_1.z.string(), zod_1.z.any())), pageInfo };
|
|
14
22
|
const eventsOutput = { events: zod_1.z.array(zod_1.z.record(zod_1.z.string(), zod_1.z.any())), pageInfo };
|
|
15
23
|
const jobOutput = {
|
|
@@ -130,7 +138,10 @@ exports.integrationTools = [
|
|
|
130
138
|
.enum(['PENDING', 'RUNNING', 'COMPLETED', 'FAILED', 'CANCELLED'])
|
|
131
139
|
.optional()
|
|
132
140
|
.describe('Optional status to filter jobs'),
|
|
133
|
-
integrationInstanceId: zod_1.z
|
|
141
|
+
integrationInstanceId: zod_1.z
|
|
142
|
+
.string()
|
|
143
|
+
.optional()
|
|
144
|
+
.describe('Optional ID to filter jobs by instance'),
|
|
134
145
|
integrationDefinitionId: zod_1.z
|
|
135
146
|
.string()
|
|
136
147
|
.optional()
|
|
@@ -153,7 +164,7 @@ exports.integrationTools = [
|
|
|
153
164
|
outputSchema: jobsOutput,
|
|
154
165
|
annotations: types_js_1.READ_ONLY,
|
|
155
166
|
errorContext: 'Error getting integration jobs',
|
|
156
|
-
handler: async ({ status, integrationInstanceId, integrationDefinitionId, integrationInstanceIds, size, cursor }, client) => {
|
|
167
|
+
handler: async ({ status, integrationInstanceId, integrationDefinitionId, integrationInstanceIds, size, cursor, }, client) => {
|
|
157
168
|
const jobs = await client.getIntegrationJobs(status, integrationInstanceId, integrationDefinitionId, integrationInstanceIds, cursor, size);
|
|
158
169
|
return (0, result_js_1.structuredResult)({
|
|
159
170
|
total: jobs.jobs.length,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integrations.js","sourceRoot":"","sources":["../../../src/server/tools/integrations.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,yEAAkE;AAClE,2CAA+C;AAC/C,yCAAwE;AAExE,8FAA8F;AAC9F,iEAAiE;AACjE,MAAM,QAAQ,GAAG,OAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC;AACpC,MAAM,iBAAiB,GAAG,
|
|
1
|
+
{"version":3,"file":"integrations.js","sourceRoot":"","sources":["../../../src/server/tools/integrations.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,yEAAkE;AAClE,2CAA+C;AAC/C,yCAAwE;AAExE,8FAA8F;AAC9F,iEAAiE;AACjE,MAAM,QAAQ,GAAG,OAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC;AACpC,MAAM,iBAAiB,GAAG;IACxB,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;IACjB,WAAW,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,GAAG,EAAE,CAAC,CAAC;IACnD,QAAQ;CACT,CAAC;AACF,MAAM,eAAe,GAAG;IACtB,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;IACjB,SAAS,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,GAAG,EAAE,CAAC,CAAC;IACjD,QAAQ;CACT,CAAC;AACF,MAAM,UAAU,GAAG,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AAE,KAAK,CAAC,KAAK;oBAClB,SAAS,EAAE,KAAK,CAAC,SAAS;iBAC3B,CAAC,CAAC;gBACH,QAAQ,EAAE,MAAM,CAAC,QAAQ;aAC1B,CAAC,CAAC;QACL,CAAC;KACF,CAAC;CACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"j1ql.d.ts","sourceRoot":"","sources":["../../../src/server/tools/j1ql.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"j1ql.d.ts","sourceRoot":"","sources":["../../../src/server/tools/j1ql.ts"],"names":[],"mappings":"AAYA,OAAO,EAAyB,KAAK,cAAc,EAAmB,MAAM,YAAY,CAAC;AA0SzF,eAAO,MAAM,SAAS,EAAE,cAAc,EAkJrC,CAAC"}
|