@jupiterone/jupiterone-mcp 1.2.0 → 1.4.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/dist/client/graphql/queries.d.ts +1 -0
- package/dist/client/graphql/queries.d.ts.map +1 -1
- package/dist/client/graphql/queries.js +19 -1
- package/dist/client/graphql/queries.js.map +1 -1
- package/dist/client/jupiterone-client.d.ts +1 -0
- package/dist/client/jupiterone-client.d.ts.map +1 -1
- package/dist/client/jupiterone-client.js +3 -0
- package/dist/client/jupiterone-client.js.map +1 -1
- package/dist/client/services/account-service.d.ts +16 -0
- package/dist/client/services/account-service.d.ts.map +1 -1
- package/dist/client/services/account-service.js +19 -0
- package/dist/client/services/account-service.js.map +1 -1
- package/dist/client/services/j1ql-service.d.ts +44 -3
- package/dist/client/services/j1ql-service.d.ts.map +1 -1
- package/dist/client/services/j1ql-service.js +82 -31
- package/dist/client/services/j1ql-service.js.map +1 -1
- package/dist/generated/description-map.d.ts.map +1 -1
- package/dist/generated/description-map.js +47 -6
- package/dist/generated/description-map.js.map +1 -1
- package/dist/server/mcp-server.d.ts +10 -0
- package/dist/server/mcp-server.d.ts.map +1 -1
- package/dist/server/mcp-server.js +55 -35
- package/dist/server/mcp-server.js.map +1 -1
- package/dist/server/tools/account.d.ts +25 -0
- package/dist/server/tools/account.d.ts.map +1 -1
- package/dist/server/tools/account.js +97 -5
- package/dist/server/tools/account.js.map +1 -1
- package/dist/server/tools/errors.d.ts +14 -6
- package/dist/server/tools/errors.d.ts.map +1 -1
- package/dist/server/tools/errors.js +22 -7
- package/dist/server/tools/errors.js.map +1 -1
- package/dist/server/tools/j1ql.d.ts.map +1 -1
- package/dist/server/tools/j1ql.js +215 -22
- package/dist/server/tools/j1ql.js.map +1 -1
- package/dist/server/tools/types.d.ts +4 -0
- package/dist/server/tools/types.d.ts.map +1 -1
- package/dist/server/tools/types.js.map +1 -1
- package/dist/server/tools/usage.d.ts.map +1 -1
- package/dist/server/tools/usage.js +4 -0
- package/dist/server/tools/usage.js.map +1 -1
- package/node_modules/dtrace-provider/build/Makefile +1 -1
- package/package.json +1 -1
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.j1qlTools = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const j1ql_service_js_1 = require("../../client/services/j1ql-service.js");
|
|
5
6
|
const j1ql_validator_js_1 = require("../../utils/j1ql-validator.js");
|
|
6
7
|
const load_description_js_1 = require("../../utils/load-description.js");
|
|
7
8
|
const errors_js_1 = require("./errors.js");
|
|
@@ -23,7 +24,156 @@ const executeJ1qlOutput = {
|
|
|
23
24
|
cursor: zod_1.z.string().nullish(),
|
|
24
25
|
hasMore: zod_1.z.boolean().optional(),
|
|
25
26
|
messages: zod_1.z.array(zod_1.z.any()).optional(),
|
|
27
|
+
resultsUrl: zod_1.z.string().optional(),
|
|
28
|
+
startedAt: zod_1.z.string().optional(),
|
|
29
|
+
elapsedSeconds: zod_1.z.number().optional(),
|
|
26
30
|
};
|
|
31
|
+
// Upstream execution lifecycle (query-engine): a Neo4j transaction is abandoned at 4 minutes and
|
|
32
|
+
// the job is redelivered up to 3 times, so a query still IN_PROGRESS past ~13 minutes will not
|
|
33
|
+
// succeed. These bounds power the liveness guidance in the IN_PROGRESS envelope.
|
|
34
|
+
const QUERY_WORST_CASE_MS = 13 * 60 * 1000;
|
|
35
|
+
/**
|
|
36
|
+
* Recover a query's start time from its handle URL. The storage-token form embeds a JWT whose
|
|
37
|
+
* `iat` is the initiation time; S3 presigned URLs carry `X-Amz-Date`. Returns null when the URL
|
|
38
|
+
* matches neither shape — liveness then degrades gracefully rather than blocking the envelope.
|
|
39
|
+
*/
|
|
40
|
+
function handleStartedAtMs(rawUrl) {
|
|
41
|
+
let url;
|
|
42
|
+
try {
|
|
43
|
+
url = new URL(rawUrl);
|
|
44
|
+
}
|
|
45
|
+
catch {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
const amzDate = url.searchParams.get('X-Amz-Date');
|
|
49
|
+
if (amzDate) {
|
|
50
|
+
const m = amzDate.match(/^(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2})Z$/);
|
|
51
|
+
if (m)
|
|
52
|
+
return Date.UTC(+m[1], +m[2] - 1, +m[3], +m[4], +m[5], +m[6]);
|
|
53
|
+
}
|
|
54
|
+
for (const segment of url.pathname.split('/')) {
|
|
55
|
+
const parts = segment.split('.');
|
|
56
|
+
if (parts.length !== 3)
|
|
57
|
+
continue;
|
|
58
|
+
try {
|
|
59
|
+
const payload = JSON.parse(Buffer.from(parts[1], 'base64url').toString('utf8'));
|
|
60
|
+
if (typeof payload.iat === 'number')
|
|
61
|
+
return payload.iat * 1000;
|
|
62
|
+
}
|
|
63
|
+
catch {
|
|
64
|
+
// Not a JWT segment; keep scanning.
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
function formatElapsed(elapsedMs) {
|
|
70
|
+
const totalSeconds = Math.round(elapsedMs / 1000);
|
|
71
|
+
const minutes = Math.floor(totalSeconds / 60);
|
|
72
|
+
return minutes > 0 ? `${minutes}m ${totalSeconds % 60}s` : `${totalSeconds}s`;
|
|
73
|
+
}
|
|
74
|
+
/** Phase-appropriate liveness sentence for a still-running query, or null when age is unknown. */
|
|
75
|
+
function livenessNote(elapsedMs) {
|
|
76
|
+
if (elapsedMs === null)
|
|
77
|
+
return null;
|
|
78
|
+
const elapsed = formatElapsed(elapsedMs);
|
|
79
|
+
if (elapsedMs >= QUERY_WORST_CASE_MS) {
|
|
80
|
+
return (`Elapsed so far: ${elapsed} — this is past the backend's full retry window (~13 minutes), ` +
|
|
81
|
+
'so it is unlikely to succeed. Abandon this handle and run a narrower version of the query ' +
|
|
82
|
+
'now (indexed WITH filters, smaller LIMIT, fewer traversals).');
|
|
83
|
+
}
|
|
84
|
+
return (`Elapsed so far: ${elapsed}. Queries that succeed usually finish within ~4 minutes of ` +
|
|
85
|
+
'execution (the backend abandons an attempt at 4 minutes and redelivers up to 3 times, so ' +
|
|
86
|
+
'~13 minutes is the hard ceiling).');
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Synchronous wait before returning the IN_PROGRESS handle, in poll attempts (× 1s). Sized from
|
|
90
|
+
* production latency (21 days, n=4,537 successful queries: p50 1.7s, p95 6.8s, p99 17s): 10s
|
|
91
|
+
* completes ~97% of queries in a single call, while genuinely long queries get their resume
|
|
92
|
+
* handle ~35s sooner than the previous full-window wait.
|
|
93
|
+
*/
|
|
94
|
+
const FIRST_RESPONSE_MAX_POLL_ATTEMPTS = 10;
|
|
95
|
+
/**
|
|
96
|
+
* Non-error envelope returned when the first-response budget expires while the backend is still
|
|
97
|
+
* executing (it runs to completion regardless — typically within ~4 minutes — and retains results
|
|
98
|
+
* at the status URL for about an hour). The guidance is deliberately non-blocking: the two worst
|
|
99
|
+
* agent behaviors here are idling until the query finishes and spamming execute-j1ql-query to
|
|
100
|
+
* force a result, so it leads with "keep working" and routes collection through
|
|
101
|
+
* get-query-results.
|
|
102
|
+
*/
|
|
103
|
+
function queryStillRunningResult(error) {
|
|
104
|
+
const startedAtMs = error.startedAt ?? handleStartedAtMs(error.resultsUrl);
|
|
105
|
+
// Clamped at 0: the handle's timestamp is unverified and clocks can skew, so a future
|
|
106
|
+
// startedAt must not produce negative elapsed values in the liveness text or envelope.
|
|
107
|
+
const elapsedMs = startedAtMs === null || startedAtMs === undefined ? null : Math.max(0, Date.now() - startedAtMs);
|
|
108
|
+
const liveness = livenessNote(elapsedMs);
|
|
109
|
+
const output = (0, result_js_1.structuredResult)({
|
|
110
|
+
status: 'IN_PROGRESS',
|
|
111
|
+
resultsUrl: error.resultsUrl,
|
|
112
|
+
...(error.correlationId ? { correlationId: error.correlationId } : {}),
|
|
113
|
+
...(startedAtMs !== null && startedAtMs !== undefined
|
|
114
|
+
? { startedAt: new Date(startedAtMs).toISOString() }
|
|
115
|
+
: {}),
|
|
116
|
+
...(elapsedMs !== null ? { elapsedSeconds: Math.round(elapsedMs / 1000) } : {}),
|
|
117
|
+
});
|
|
118
|
+
output.content.push({
|
|
119
|
+
type: 'text',
|
|
120
|
+
text: 'This query is still running server-side — it has not failed, and you do not need to wait ' +
|
|
121
|
+
'for it. Keep working (including running other queries) and collect this result when ' +
|
|
122
|
+
'convenient. To collect: call `get-query-results` with this `resultsUrl` — it waits up to ' +
|
|
123
|
+
'40s and returns the results as soon as they are ready; pass waitSeconds: 1 for an instant ' +
|
|
124
|
+
'status check instead. ' +
|
|
125
|
+
(liveness ?? 'Heavy queries usually finish within ~4 minutes.') +
|
|
126
|
+
' Do not re-issue execute-j1ql-query for this query; only rewrite it to be more selective ' +
|
|
127
|
+
'(indexed WITH filters, smaller LIMIT, fewer traversals) if it reports FAILED.',
|
|
128
|
+
});
|
|
129
|
+
return output;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Map tool parameters onto the client's query-execution arguments (folding the standalone
|
|
133
|
+
* `includeDeleted` parameter into the flags object).
|
|
134
|
+
*/
|
|
135
|
+
function buildJ1qlQueryArgs({ query, variables, cursor, includeDeleted, flags, scopeFilters, }) {
|
|
136
|
+
const queryFlags = { ...flags };
|
|
137
|
+
if (typeof includeDeleted === 'boolean')
|
|
138
|
+
queryFlags.includeDeleted = includeDeleted;
|
|
139
|
+
return {
|
|
140
|
+
query,
|
|
141
|
+
variables,
|
|
142
|
+
cursor,
|
|
143
|
+
scopeFilters,
|
|
144
|
+
flags: Object.keys(queryFlags).length > 0 ? queryFlags : undefined,
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Standard success envelope for a query result: surfaces `hasMore` (the backend signals more
|
|
149
|
+
* pages by returning a cursor) and, when true, appends the cursor-paging note as a separate text
|
|
150
|
+
* block so content[0] stays pure payload JSON. Shared by execute-j1ql-query and get-query-results.
|
|
151
|
+
*/
|
|
152
|
+
function formatQueryResult(result, extras = {}) {
|
|
153
|
+
const hasMore = typeof result.cursor === 'string' && result.cursor.length > 0;
|
|
154
|
+
const output = (0, result_js_1.structuredResult)({ ...result, ...extras, hasMore });
|
|
155
|
+
if (hasMore) {
|
|
156
|
+
output.content.push({ type: 'text', text: PAGINATION_NOTE });
|
|
157
|
+
}
|
|
158
|
+
return output;
|
|
159
|
+
}
|
|
160
|
+
// The handle URL is fetched server-side, so an agent-supplied value is an SSRF vector (e.g. the
|
|
161
|
+
// EC2 metadata endpoint). Only redeem handles that point at the places the backend actually
|
|
162
|
+
// writes result files: S3 (possibly via the JupiterOne download domain).
|
|
163
|
+
const ALLOWED_RESULTS_URL_SUFFIXES = ['.amazonaws.com', '.jupiterone.io'];
|
|
164
|
+
function resultsUrlProblem(raw) {
|
|
165
|
+
let url;
|
|
166
|
+
try {
|
|
167
|
+
url = new URL(raw);
|
|
168
|
+
}
|
|
169
|
+
catch {
|
|
170
|
+
return 'not a valid URL';
|
|
171
|
+
}
|
|
172
|
+
if (url.protocol !== 'https:')
|
|
173
|
+
return 'must use https';
|
|
174
|
+
const allowed = ALLOWED_RESULTS_URL_SUFFIXES.some((suffix) => url.hostname.endsWith(suffix));
|
|
175
|
+
return allowed ? null : 'host is not a JupiterOne results location';
|
|
176
|
+
}
|
|
27
177
|
// One-line note emitted as a separate text content block when more pages exist, steering agents to
|
|
28
178
|
// the cursor parameter rather than SKIP (which re-scans from the start and is not a pagination
|
|
29
179
|
// mechanism). A separate block keeps content[0] as pure payload JSON (parity with structuredContent)
|
|
@@ -63,40 +213,83 @@ exports.j1qlTools = [
|
|
|
63
213
|
outputSchema: executeJ1qlOutput,
|
|
64
214
|
errorContext: 'Error executing J1QL query',
|
|
65
215
|
formatError: (error, { query }, validator) => (0, errors_js_1.createQueryErrorResponse)(error, query, validator),
|
|
66
|
-
handler: async (
|
|
216
|
+
handler: async (params, client, validator) => {
|
|
67
217
|
// Static parse gate: syntax errors fail here in milliseconds, with the same parser (and
|
|
68
218
|
// message) the backend would use, instead of costing a query-service round-trip. Thrown
|
|
69
219
|
// (not returned) so the rejection carries errorClass/errorMessage through the telemetry
|
|
70
220
|
// chokepoint exactly like a backend-thrown parse error; formatError renders the envelope.
|
|
71
221
|
// Skipped when variables are supplied — substitution happens server-side, so the raw
|
|
72
222
|
// template text may not parse locally.
|
|
73
|
-
if (!variables || Object.keys(variables).length === 0) {
|
|
74
|
-
const validation = validator.validateQuery(query);
|
|
223
|
+
if (!params.variables || Object.keys(params.variables).length === 0) {
|
|
224
|
+
const validation = validator.validateQuery(params.query);
|
|
75
225
|
if (!validation.isValid) {
|
|
76
226
|
throw new j1ql_validator_js_1.J1qlSyntaxError(validation.error ?? 'Invalid J1QL query', validation.suggestion);
|
|
77
227
|
}
|
|
78
228
|
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
229
|
+
let result;
|
|
230
|
+
try {
|
|
231
|
+
result = await client.executeJ1qlQuery({
|
|
232
|
+
...buildJ1qlQueryArgs(params),
|
|
233
|
+
maxPollAttempts: FIRST_RESPONSE_MAX_POLL_ATTEMPTS,
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
catch (error) {
|
|
237
|
+
if (error instanceof j1ql_service_js_1.J1qlQueryTimeoutError)
|
|
238
|
+
return queryStillRunningResult(error);
|
|
239
|
+
throw error;
|
|
240
|
+
}
|
|
89
241
|
const accountInfo = await client.getAccountInfo();
|
|
90
|
-
const queryUrl = client.j1qlService.constructQueryUrl(query, accountInfo.subdomain);
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
242
|
+
const queryUrl = client.j1qlService.constructQueryUrl(params.query, accountInfo.subdomain);
|
|
243
|
+
return formatQueryResult(result, { url: queryUrl });
|
|
244
|
+
},
|
|
245
|
+
}),
|
|
246
|
+
(0, types_js_1.defineTool)({
|
|
247
|
+
name: 'get-query-results',
|
|
248
|
+
title: 'Get Query Results',
|
|
249
|
+
description: (0, load_description_js_1.loadDescription)('get-query-results.md'),
|
|
250
|
+
inputSchema: {
|
|
251
|
+
resultsUrl: zod_1.z
|
|
252
|
+
.string()
|
|
253
|
+
.describe('The exact resultsUrl handle returned by execute-j1ql-query when the query was still running. Do not construct or modify this URL.'),
|
|
254
|
+
waitSeconds: zod_1.z
|
|
255
|
+
.number()
|
|
256
|
+
.int()
|
|
257
|
+
.min(1)
|
|
258
|
+
.max(45)
|
|
259
|
+
.optional()
|
|
260
|
+
.describe('How long to wait for completion before returning the IN_PROGRESS handle again (default 40)'),
|
|
261
|
+
},
|
|
262
|
+
annotations: types_js_1.READ_ONLY,
|
|
263
|
+
// The presigned handle URL is the complete capability — no account context is needed to
|
|
264
|
+
// redeem it, so multi-tenant mode must not demand an accountId.
|
|
265
|
+
accountAgnostic: true,
|
|
266
|
+
outputSchema: executeJ1qlOutput,
|
|
267
|
+
errorContext: 'Error fetching query results',
|
|
268
|
+
handler: async ({ resultsUrl, waitSeconds }, client) => {
|
|
269
|
+
const problem = resultsUrlProblem(resultsUrl);
|
|
270
|
+
if (problem) {
|
|
271
|
+
return {
|
|
272
|
+
content: [
|
|
273
|
+
{
|
|
274
|
+
type: 'text',
|
|
275
|
+
text: `Invalid resultsUrl (${problem}). Pass the exact resultsUrl returned by execute-j1ql-query — do not construct or modify it.`,
|
|
276
|
+
},
|
|
277
|
+
],
|
|
278
|
+
isError: true,
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
let result;
|
|
282
|
+
try {
|
|
283
|
+
result = await client.j1qlService.pollDeferredResult(resultsUrl, {
|
|
284
|
+
maxPollAttempts: waitSeconds ?? 40,
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
catch (error) {
|
|
288
|
+
if (error instanceof j1ql_service_js_1.J1qlQueryTimeoutError)
|
|
289
|
+
return queryStillRunningResult(error);
|
|
290
|
+
throw error;
|
|
98
291
|
}
|
|
99
|
-
return
|
|
292
|
+
return formatQueryResult(result);
|
|
100
293
|
},
|
|
101
294
|
}),
|
|
102
295
|
(0, types_js_1.defineTool)({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"j1ql.js","sourceRoot":"","sources":["../../../src/server/tools/j1ql.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,qEAAgE;AAChE,yEAAkE;AAClE,2CAAuD;AACvD,2CAA+C;AAC/C,
|
|
1
|
+
{"version":3,"file":"j1ql.js","sourceRoot":"","sources":["../../../src/server/tools/j1ql.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,2EAA8E;AAC9E,qEAAgE;AAChE,yEAAkE;AAClE,2CAAuD;AACvD,2CAA+C;AAC/C,yCAAyF;AAEzF,iGAAiG;AACjG,mGAAmG;AACnG,wFAAwF;AACxF,gGAAgG;AAChG,oGAAoG;AACpG,MAAM,iBAAiB,GAAG;IACxB,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE;IACnC,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE;IAC5B,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE;IAC9B,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC1B,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE;IAC1B,IAAI,EAAE,OAAC,CAAC,KAAK,CAAC,CAAC,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,GAAG,EAAE,CAAC,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE;IAC9D,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,C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AAO;oBACL,OAAO,EAAE;wBACP;4BACE,IAAI,EAAE,MAAe;4BACrB,IAAI,EAAE,uBAAuB,OAAO,8FAA8F;yBACnI;qBACF;oBACD,OAAO,EAAE,IAAI;iBACd,CAAC;YACJ,CAAC;YAED,IAAI,MAAM,CAAC;YACX,IAAI,CAAC;gBACH,MAAM,GAAG,MAAM,MAAM,CAAC,WAAW,CAAC,kBAAkB,CAAC,UAAoB,EAAE;oBACzE,eAAe,EAAG,WAAkC,IAAI,EAAE;iBAC3D,CAAC,CAAC;YACL,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,IAAI,KAAK,YAAY,uCAAqB;oBAAE,OAAO,uBAAuB,CAAC,KAAK,CAAC,CAAC;gBAClF,MAAM,KAAK,CAAC;YACd,CAAC;YAED,OAAO,iBAAiB,CAAC,MAAM,CAAC,CAAC;QACnC,CAAC;KACF,CAAC;IAEF,IAAA,qBAAU,EAAC;QACT,IAAI,EAAE,mBAAmB;QACzB,KAAK,EAAE,mBAAmB;QAC1B,WAAW,EAAE,IAAA,qCAAe,EAAC,sBAAsB,CAAC;QACpD,WAAW,EAAE,EAAE;QACf,YAAY,EAAE,qBAAqB;QACnC,WAAW,EAAE,oBAAS;QACtB,YAAY,EAAE,4BAA4B;QAC1C,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE;YACjC,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,eAAe,EAAE,CAAC;YAC/C,OAAO,IAAA,4BAAgB,EAAC,OAAO,CAAC,CAAC;QACnC,CAAC;KACF,CAAC;CACH,CAAC"}
|
|
@@ -16,6 +16,8 @@ export interface ToolResult {
|
|
|
16
16
|
export interface AccountSummary {
|
|
17
17
|
accountId: string;
|
|
18
18
|
displayName: string;
|
|
19
|
+
/** Ready-to-use MCP connector URL pinning this account, when the host can construct one. */
|
|
20
|
+
mcpUrl?: string;
|
|
19
21
|
}
|
|
20
22
|
/**
|
|
21
23
|
* Resolves the accounts the caller can access. Supplied by the host (the remote proxy) because the
|
|
@@ -29,6 +31,8 @@ export type AccountResolver = () => Promise<AccountSummary[]>;
|
|
|
29
31
|
export interface ToolContext {
|
|
30
32
|
/** Resolve the caller's accounts. Present only when the host supplies a resolver (multi-tenant remote). */
|
|
31
33
|
resolveAccounts?: AccountResolver;
|
|
34
|
+
/** The fixed account this server instance is bound to (URL/env pinned), when single-tenant. */
|
|
35
|
+
pinnedAccountId?: string;
|
|
32
36
|
}
|
|
33
37
|
/** Handler for a tool. Receives request-scoped, account-resolved dependencies and call context. */
|
|
34
38
|
export type ToolHandler<T extends z.ZodRawShape> = (params: z.infer<z.ZodObject<T>>, client: JupiterOneClient, validator: J1QLValidator, context: ToolContext) => Promise<ToolResult>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/server/tools/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAEnE,yFAAyF;AACzF,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,2FAA2F;IAC3F,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,EAAE,CAAC;CACzD;AAED,uFAAuF;AACvF,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/server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M,WAAW,cAAc,CAAC,CAAC,SAAS,CAAC,CAAC,WAAW,GAAG,CAAC,CAAC,WAAW;IACrE,IAAI,EAAE,MAAM,CAAC;IACb,wFAAwF;IACxF,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,CAAC,CAAC;IACf,sGAAsG;IACtG,YAAY,CAAC,EAAE,CAAC,CAAC,WAAW,CAAC;IAC7B;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;;OAIG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,6FAA6F;IAC7F,WAAW,EAAE,eAAe,CAAC;IAC7B,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;IACxB,kGAAkG;IAClG,YAAY,EAAE,MAAM,CAAC;IACrB,4FAA4F;IAC5F,WAAW,CAAC,EAAE,CACZ,KAAK,EAAE,OAAO,EACd,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,EAC/B,SAAS,EAAE,aAAa,KACrB,UAAU,CAAC;CACjB;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE,GAAG,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,cAAc,CAE1F;AAED,mGAAmG;AACnG,eAAO,MAAM,SAAS,EAAE,eAAwC,CAAC;AACjE,eAAO,MAAM,MAAM,EAAE,eAAiE,CAAC;AACvF,eAAO,MAAM,MAAM,EAAE,eAAgE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/server/tools/types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/server/tools/types.ts"],"names":[],"mappings":";;;AAsFA,gCAEC;AAND;;;GAGG;AACH,SAAgB,UAAU,CAA0B,GAAsB;IACxE,OAAO,GAAgC,CAAC;AAC1C,CAAC;AAED,mGAAmG;AACtF,QAAA,SAAS,GAAoB,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC;AACpD,QAAA,MAAM,GAAoB,EAAE,YAAY,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,CAAC;AAC1E,QAAA,MAAM,GAAoB,EAAE,YAAY,EAAE,KAAK,EAAE,eAAe,EAAE,IAAI,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usage.d.ts","sourceRoot":"","sources":["../../../src/server/tools/usage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAIhD;AAID,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAErD;AA2BD,yEAAyE;AACzE,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CASvF;AAcD,wFAAwF;AACxF,wBAAgB,eAAe,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"usage.d.ts","sourceRoot":"","sources":["../../../src/server/tools/usage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAIhD;AAID,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAErD;AA2BD,yEAAyE;AACzE,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CASvF;AAcD,wFAAwF;AACxF,wBAAgB,eAAe,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CA+B3E"}
|
|
@@ -79,6 +79,10 @@ function summarizeResult(result) {
|
|
|
79
79
|
const obj = sc;
|
|
80
80
|
if (typeof obj.status === 'string')
|
|
81
81
|
out.status = obj.status;
|
|
82
|
+
// The query correlation id ties an IN_PROGRESS handle issuance to its later get-query-results
|
|
83
|
+
// redemptions, making the deferred-query lifecycle joinable in telemetry.
|
|
84
|
+
if (typeof obj.correlationId === 'string')
|
|
85
|
+
out.correlationId = obj.correlationId;
|
|
82
86
|
const explicit = obj.total ?? obj.returned ?? obj.totalCount;
|
|
83
87
|
if (typeof explicit === 'number') {
|
|
84
88
|
out.resultCount = explicit;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usage.js","sourceRoot":"","sources":["../../../src/server/tools/usage.ts"],"names":[],"mappings":";;AAUA,gCAIC;AAID,wCAEC;AA4BD,wCASC;AAeD,
|
|
1
|
+
{"version":3,"file":"usage.js","sourceRoot":"","sources":["../../../src/server/tools/usage.ts"],"names":[],"mappings":";;AAUA,gCAIC;AAID,wCAEC;AA4BD,wCASC;AAeD,0CA+BC;AArGD;;;;;;;GAOG;AACH,SAAgB,UAAU,CAAC,KAAa;IACtC,OAAO,KAAK;SACT,OAAO,CAAC,oBAAoB,EAAE,cAAc,CAAC;SAC7C,OAAO,CAAC,oBAAoB,EAAE,cAAc,CAAC,CAAC;AACnD,CAAC;AAED,MAAM,UAAU,GAAG,GAAG,CAAC;AAEvB,SAAgB,cAAc,CAAC,MAAc;IAC3C,OAAO,MAAM,CAAC,MAAM,GAAG,UAAU,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC;AACjF,CAAC;AAED,oGAAoG;AACpG,oGAAoG;AACpG,2FA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opt/hostedtoolcache/node/18.20.8/x64/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py -fmake --ignore-environment "-Dlibrary=shared_library" "-Dvisibility=default" "-Dnode_root_dir=/home/runner/.cache/node-gyp/18.20.8" "-Dnode_gyp_dir=/opt/hostedtoolcache/node/18.20.8/x64/lib/node_modules/npm/node_modules/node-gyp" "-Dnode_lib_file=/home/runner/.cache/node-gyp/18.20.8/<(target_arch)/node.lib" "-Dmodule_root_dir=/home/runner/work/jupiterone-mcp-server/jupiterone-mcp-server/node_modules/dtrace-provider" "-Dnode_engine=v8" "--depth=." "-Goutput_dir=." "--generator-output=build" -I/home/runner/work/jupiterone-mcp-server/jupiterone-mcp-server/node_modules/dtrace-provider/build/config.gypi -I/opt/hostedtoolcache/node/18.20.8/x64/lib/node_modules/npm/node_modules/node-gyp/addon.gypi -I/home/runner/.cache/node-gyp/18.20.8/include/node/common.gypi "--toplevel-dir=." binding.gyp
|
|
342
|
-
Makefile: $(srcdir)/../../../../../../../opt/hostedtoolcache/node/18.20.8/x64/lib/node_modules/npm/node_modules/node-gyp/addon.gypi $(srcdir)/../../../../../.cache/node-gyp/18.20.8/include/node/common.gypi
|
|
342
|
+
Makefile: $(srcdir)/build/config.gypi $(srcdir)/binding.gyp $(srcdir)/../../../../../../../opt/hostedtoolcache/node/18.20.8/x64/lib/node_modules/npm/node_modules/node-gyp/addon.gypi $(srcdir)/../../../../../.cache/node-gyp/18.20.8/include/node/common.gypi
|
|
343
343
|
$(call do_cmd,regen_makefile)
|
|
344
344
|
|
|
345
345
|
# "all" is a concatenation of the "all" targets from all the included
|