@jupiterone/jupiterone-mcp 2.5.0 → 2.6.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.
Files changed (80) hide show
  1. package/README.md +25 -4
  2. package/dist/client/services/compliance-service.d.ts +0 -2
  3. package/dist/client/services/compliance-service.d.ts.map +1 -1
  4. package/dist/client/services/compliance-service.js +0 -2
  5. package/dist/client/services/compliance-service.js.map +1 -1
  6. package/dist/generated/description-map.d.ts.map +1 -1
  7. package/dist/generated/description-map.js +1677 -3610
  8. package/dist/generated/description-map.js.map +1 -1
  9. package/dist/server/mcp-server.d.ts.map +1 -1
  10. package/dist/server/mcp-server.js +6 -3
  11. package/dist/server/mcp-server.js.map +1 -1
  12. package/dist/server/tools/account.d.ts.map +1 -1
  13. package/dist/server/tools/account.js +53 -14
  14. package/dist/server/tools/account.js.map +1 -1
  15. package/dist/server/tools/compliance/attestations.d.ts +3 -0
  16. package/dist/server/tools/compliance/attestations.d.ts.map +1 -0
  17. package/dist/server/tools/compliance/attestations.js +560 -0
  18. package/dist/server/tools/compliance/attestations.js.map +1 -0
  19. package/dist/server/tools/compliance/controls.d.ts +46 -0
  20. package/dist/server/tools/compliance/controls.d.ts.map +1 -0
  21. package/dist/server/tools/compliance/controls.js +928 -0
  22. package/dist/server/tools/compliance/controls.js.map +1 -0
  23. package/dist/server/tools/compliance/index.d.ts +21 -0
  24. package/dist/server/tools/compliance/index.d.ts.map +1 -0
  25. package/dist/server/tools/compliance/index.js +45 -0
  26. package/dist/server/tools/compliance/index.js.map +1 -0
  27. package/dist/server/tools/compliance/schemas.d.ts +368 -0
  28. package/dist/server/tools/compliance/schemas.d.ts.map +1 -0
  29. package/dist/server/tools/compliance/schemas.js +295 -0
  30. package/dist/server/tools/compliance/schemas.js.map +1 -0
  31. package/dist/server/tools/compliance/shared.d.ts +141 -0
  32. package/dist/server/tools/compliance/shared.d.ts.map +1 -0
  33. package/dist/server/tools/compliance/shared.js +231 -0
  34. package/dist/server/tools/compliance/shared.js.map +1 -0
  35. package/dist/server/tools/compliance/summary.d.ts +11 -0
  36. package/dist/server/tools/compliance/summary.d.ts.map +1 -0
  37. package/dist/server/tools/compliance/summary.js +931 -0
  38. package/dist/server/tools/compliance/summary.js.map +1 -0
  39. package/dist/server/tools/dashboards.d.ts.map +1 -1
  40. package/dist/server/tools/dashboards.js +3 -1
  41. package/dist/server/tools/dashboards.js.map +1 -1
  42. package/dist/server/tools/errors.d.ts +9 -1
  43. package/dist/server/tools/errors.d.ts.map +1 -1
  44. package/dist/server/tools/errors.js +33 -3
  45. package/dist/server/tools/errors.js.map +1 -1
  46. package/dist/server/tools/index.d.ts.map +1 -1
  47. package/dist/server/tools/index.js +4 -2
  48. package/dist/server/tools/index.js.map +1 -1
  49. package/dist/server/tools/j1ql.d.ts.map +1 -1
  50. package/dist/server/tools/j1ql.js +33 -9
  51. package/dist/server/tools/j1ql.js.map +1 -1
  52. package/dist/server/tools/reference.d.ts +19 -0
  53. package/dist/server/tools/reference.d.ts.map +1 -0
  54. package/dist/server/tools/reference.js +62 -0
  55. package/dist/server/tools/reference.js.map +1 -0
  56. package/dist/server/tools/rules.d.ts.map +1 -1
  57. package/dist/server/tools/rules.js +81 -104
  58. package/dist/server/tools/rules.js.map +1 -1
  59. package/dist/server/tools/threat.d.ts.map +1 -1
  60. package/dist/server/tools/threat.js +54 -4
  61. package/dist/server/tools/threat.js.map +1 -1
  62. package/dist/server/tools/types.d.ts +12 -0
  63. package/dist/server/tools/types.d.ts.map +1 -1
  64. package/dist/server/tools/types.js +8 -1
  65. package/dist/server/tools/types.js.map +1 -1
  66. package/dist/server/tools/usage.d.ts +6 -0
  67. package/dist/server/tools/usage.d.ts.map +1 -1
  68. package/dist/server/tools/usage.js +53 -8
  69. package/dist/server/tools/usage.js.map +1 -1
  70. package/dist/server/tools/widget-render-contract.d.ts +1 -1
  71. package/dist/utils/expires-on.d.ts +24 -0
  72. package/dist/utils/expires-on.d.ts.map +1 -0
  73. package/dist/utils/expires-on.js +79 -0
  74. package/dist/utils/expires-on.js.map +1 -0
  75. package/node_modules/dtrace-provider/build/Makefile +1 -1
  76. package/package.json +1 -1
  77. package/dist/server/tools/compliance.d.ts +0 -107
  78. package/dist/server/tools/compliance.d.ts.map +0 -1
  79. package/dist/server/tools/compliance.js +0 -2886
  80. package/dist/server/tools/compliance.js.map +0 -1
@@ -0,0 +1,295 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.revokeAttestationOutput = exports.updateAttestationOutput = exports.createAttestationOutput = exports.getControlOutput = exports.listControlsOutput = exports.complianceSummaryOutput = void 0;
4
+ const zod_1 = require("zod");
5
+ /** Output schemas of the compliance tools. */
6
+ // Discriminators are plain strings, never enums: hosts cache tools/list across deploys, so a value
7
+ // added in a later release would fail validation against the cached schema (the sweep in
8
+ // output-schema-openness.test.ts). Their values are documented in each tool's description.
9
+ const str = () => zod_1.z.string().nullish();
10
+ const num = () => zod_1.z.number().nullish();
11
+ const attestationOutput = () => zod_1.z.looseObject({
12
+ id: str(),
13
+ subject: str(),
14
+ state: str(),
15
+ expiresOn: num(),
16
+ expiresOnIso: str(),
17
+ owner: str(),
18
+ author: str(),
19
+ documentLink: str(),
20
+ controlId: str(),
21
+ });
22
+ const blockersOutput = () => zod_1.z.array(zod_1.z.looseObject({
23
+ type: zod_1.z.string(), // failing_test | expired_attestation | not_live
24
+ id: str(),
25
+ name: str(),
26
+ subject: str(),
27
+ expiresOnIso: str(),
28
+ state: str(),
29
+ }));
30
+ const frameworkScoreOutput = () => zod_1.z.looseObject({
31
+ id: str(),
32
+ name: str(),
33
+ url: zod_1.z.string().optional(),
34
+ importStatus: str(),
35
+ controls: zod_1.z
36
+ .looseObject({
37
+ total: num(),
38
+ passing: num(),
39
+ failing: num(),
40
+ attested: num(),
41
+ withTests: num(),
42
+ passingWithoutData: num(),
43
+ })
44
+ .nullish(),
45
+ requirements: zod_1.z
46
+ .looseObject({ total: num(), passing: num(), failing: num(), failingCritical: num() })
47
+ .nullish(),
48
+ healthPct: num(),
49
+ });
50
+ exports.complianceSummaryOutput = {
51
+ outcome: zod_1.z.string(), // ok | ambiguous | framework_not_found
52
+ frameworkResolution: zod_1.z.string().optional(), // id | name | partial | ambiguous | not_found
53
+ candidates: zod_1.z
54
+ .array(zod_1.z.looseObject({
55
+ id: str(),
56
+ name: str(),
57
+ source: str(),
58
+ sourceId: str(),
59
+ owner: str(),
60
+ importStatus: str(),
61
+ url: zod_1.z.string().optional(),
62
+ }))
63
+ .optional(),
64
+ candidateCount: zod_1.z.number().optional(),
65
+ frameworksComplete: zod_1.z.boolean(),
66
+ // Required: every outcome sends it, and hosts validate against the schema they cached.
67
+ frameworks: zod_1.z.array(frameworkScoreOutput()),
68
+ statsIncomplete: zod_1.z.array(zod_1.z.string()).optional(),
69
+ framework: zod_1.z
70
+ .looseObject({
71
+ id: str(),
72
+ name: str(),
73
+ url: zod_1.z.string().optional(),
74
+ healthPct: num(),
75
+ sections: zod_1.z
76
+ .array(zod_1.z.looseObject({ section: str(), requirements: num(), passing: num(), failing: num() }))
77
+ .nullable(),
78
+ failingRequirements: zod_1.z.array(zod_1.z.looseObject({
79
+ id: str(),
80
+ identifier: str(),
81
+ title: str(),
82
+ section: str(),
83
+ priority: str(),
84
+ failingControls: zod_1.z.array(zod_1.z.looseObject({ id: str(), identifier: str(), name: str(), url: zod_1.z.string().optional() })),
85
+ })),
86
+ failingControls: zod_1.z
87
+ .array(zod_1.z.looseObject({ id: str(), identifier: str(), name: str(), url: zod_1.z.string().optional() }))
88
+ .optional(),
89
+ failingControlsTruncated: zod_1.z.boolean().optional(),
90
+ requirementLookupsSkipped: zod_1.z.number().optional(),
91
+ drillSource: zod_1.z.string().optional(), // graph | api
92
+ requirementLookupsSkippedBy: zod_1.z
93
+ .looseObject({ timeBudget: num(), cap: num(), readFailed: num() })
94
+ .optional(),
95
+ passingWithoutDataSkipped: zod_1.z.string().optional(), // time_budget | read_failed
96
+ passingWithoutDataTruncated: zod_1.z.boolean().optional(),
97
+ })
98
+ .optional(),
99
+ expiringAttestations: zod_1.z
100
+ .union([
101
+ zod_1.z.array(attestationOutput().extend({
102
+ controlName: str(),
103
+ daysUntilExpiry: num(),
104
+ url: zod_1.z.string().optional(),
105
+ })),
106
+ zod_1.z.string(), // 'unavailable'
107
+ ])
108
+ .optional(),
109
+ expiredAttestations: zod_1.z
110
+ .union([
111
+ zod_1.z.array(attestationOutput().extend({
112
+ controlName: str(),
113
+ daysSinceExpiry: num(),
114
+ url: zod_1.z.string().optional(),
115
+ })),
116
+ zod_1.z.string(), // 'unavailable'
117
+ ])
118
+ .optional(),
119
+ expiredAttestationsTruncated: zod_1.z.boolean().optional(),
120
+ expiringAttestationsScope: zod_1.z.string().optional(), // framework | account
121
+ controlNamesUnavailable: zod_1.z.boolean().optional(),
122
+ controlNamesUnresolved: zod_1.z.number().optional(),
123
+ attestationsExpiringWithinDays: zod_1.z.number().optional(),
124
+ warnings: zod_1.z.array(zod_1.z.string()).optional(),
125
+ timingsMs: zod_1.z.record(zod_1.z.string(), zod_1.z.number()).optional(),
126
+ };
127
+ exports.listControlsOutput = {
128
+ outcome: zod_1.z.string(), // ok | ambiguous | org_unit_not_found | cursor_rejected (an error)
129
+ returned: zod_1.z.number().optional(),
130
+ note: zod_1.z.string().optional(), // on ok: an empty page behind an unverified org-unit id
131
+ controls: zod_1.z
132
+ .array(zod_1.z.looseObject({
133
+ id: str(),
134
+ name: str(),
135
+ url: zod_1.z.string().optional(),
136
+ identifier: str(),
137
+ state: str(),
138
+ status: str(),
139
+ effectiveStatus: str(),
140
+ hasValidAttestation: zod_1.z.boolean().nullish(),
141
+ lastEvaluatedOn: str(),
142
+ lastEvaluatedOnIso: str(),
143
+ numberOfTests: num(),
144
+ failingTests: num(),
145
+ frameworkIds: zod_1.z.array(zod_1.z.string()).nullish(),
146
+ frameworkNames: zod_1.z.array(zod_1.z.string().nullable()).nullish(),
147
+ }))
148
+ .optional(),
149
+ pageInfo: zod_1.z.looseObject({ endCursor: str(), hasNextPage: zod_1.z.boolean().nullish() }).nullish(),
150
+ ouResolution: zod_1.z.string().optional(), // id | id_unverified | name | ambiguous | not_found
151
+ orgUnit: zod_1.z
152
+ .looseObject({
153
+ id: str(),
154
+ displayName: str(),
155
+ namespace: str(),
156
+ resolvedBy: zod_1.z.string().nullish(), // id | id_unverified | name
157
+ })
158
+ .optional(),
159
+ candidates: zod_1.z
160
+ .array(zod_1.z.looseObject({
161
+ id: str(),
162
+ displayName: str(),
163
+ namespace: str(),
164
+ active: zod_1.z.boolean().nullish(),
165
+ assetCount: num(),
166
+ }))
167
+ .optional(),
168
+ candidateCount: zod_1.z.number().optional(),
169
+ namespaces: zod_1.z
170
+ .array(zod_1.z.looseObject({ slug: str(), name: str(), failed: zod_1.z.boolean().nullish() }))
171
+ .optional(),
172
+ units: zod_1.z.array(zod_1.z.looseObject({ id: str(), displayName: str(), namespace: str() })).optional(),
173
+ timingsMs: zod_1.z.record(zod_1.z.string(), zod_1.z.number()).optional(),
174
+ };
175
+ const controlCandidateOutput = () => zod_1.z.looseObject({
176
+ id: str(),
177
+ name: str(),
178
+ identifier: str(),
179
+ catalog: str(),
180
+ state: str(),
181
+ status: str(),
182
+ url: zod_1.z.string().optional(),
183
+ frameworkIds: zod_1.z.array(zod_1.z.string()).nullish(),
184
+ frameworkNames: zod_1.z.array(zod_1.z.string().nullable()).nullish(),
185
+ });
186
+ exports.getControlOutput = {
187
+ outcome: zod_1.z.string(), // found | not_found | ambiguous
188
+ lookupBy: zod_1.z.string().optional(), // controlId | identifier | controlName
189
+ searchComplete: zod_1.z.boolean().optional(),
190
+ candidates: zod_1.z.array(controlCandidateOutput()).optional(),
191
+ candidateCount: zod_1.z.number().optional(),
192
+ otherCandidates: zod_1.z.array(controlCandidateOutput()).optional(),
193
+ note: zod_1.z.string().optional(), // the recovery, on not_found
194
+ control: zod_1.z
195
+ .looseObject({
196
+ id: str(),
197
+ name: str(),
198
+ url: zod_1.z.string().optional(),
199
+ identifier: str(),
200
+ state: str(),
201
+ status: str(),
202
+ effectiveStatus: str(),
203
+ hasValidAttestation: zod_1.z.boolean().nullish(),
204
+ lastEvaluatedOn: str(),
205
+ lastEvaluatedOnIso: str(),
206
+ })
207
+ .optional(),
208
+ statusExplanation: zod_1.z.string().optional(), // one of STATUS_EXPLANATIONS
209
+ statusMeaning: zod_1.z.string().optional(), // one sentence on what statusExplanation means here
210
+ notes: zod_1.z.array(zod_1.z.string()).optional(), // skipped reads and lookups, when any
211
+ storedStatusStale: zod_1.z.boolean().optional(),
212
+ expectedStatus: zod_1.z.string().optional(), // PASS | FAIL
213
+ passingWithoutData: zod_1.z.boolean().optional(),
214
+ blockers: blockersOutput().optional(), // failing_test | expired_attestation
215
+ frameworks: zod_1.z
216
+ .array(zod_1.z.looseObject({ id: str(), name: str(), url: zod_1.z.string().optional() }))
217
+ .optional(),
218
+ frameworksSkipped: zod_1.z.string().optional(), // time_budget | read_failed
219
+ requirementsSkipped: zod_1.z.string().optional(), // time_budget | read_failed
220
+ requirements: zod_1.z
221
+ .array(zod_1.z.looseObject({
222
+ id: str(),
223
+ identifier: str(),
224
+ title: str(),
225
+ section: str(),
226
+ priority: str(),
227
+ }))
228
+ .optional(),
229
+ requirementsComplete: zod_1.z.boolean().optional(),
230
+ attestations: zod_1.z.union([zod_1.z.array(attestationOutput()), zod_1.z.string()]).optional(), // or 'unavailable'
231
+ tests: zod_1.z
232
+ .array(zod_1.z.looseObject({
233
+ id: str(),
234
+ name: str(),
235
+ status: str(),
236
+ query: str(),
237
+ resultsAre: str(),
238
+ referencedRuleId: str(),
239
+ latestEvaluationStatus: zod_1.z.string(), // found | none | skipped | error
240
+ latestEvaluation: zod_1.z
241
+ .looseObject({
242
+ rawDataKey: str(),
243
+ resultCount: num(),
244
+ evaluatedOn: str(),
245
+ timestamp: num(),
246
+ tag: str(),
247
+ })
248
+ .nullish(),
249
+ evaluationsInWindow: zod_1.z.number().optional(),
250
+ moreInWindow: zod_1.z.boolean().optional(),
251
+ }))
252
+ .optional(),
253
+ skippedTests: zod_1.z.number().optional(),
254
+ evaluationLookupMs: zod_1.z.number().optional(),
255
+ timingsMs: zod_1.z.record(zod_1.z.string(), zod_1.z.number()).optional(),
256
+ };
257
+ const controlSummaryOutput = () => zod_1.z.looseObject({ id: str(), name: str(), state: str(), url: zod_1.z.string().optional() });
258
+ const controlLinkOutput = () => zod_1.z.looseObject({ id: str(), url: zod_1.z.string().optional() });
259
+ // blocked | passes_by_attestation | already_passing (| unknown on update)
260
+ const statusImpactOutput = {
261
+ statusImpact: zod_1.z.string().optional(),
262
+ blockers: blockersOutput().optional(),
263
+ };
264
+ exports.createAttestationOutput = {
265
+ outcome: zod_1.z.string(), // created | already_exists
266
+ attestation: attestationOutput(),
267
+ requestedExpiresOnIso: zod_1.z.string().nullish(),
268
+ requestedExpiresOnApplied: zod_1.z.boolean().optional(),
269
+ matches: zod_1.z
270
+ .array(zod_1.z.looseObject({ id: str(), subject: str(), expiresOnIso: str(), createdOn: str() }))
271
+ .optional(),
272
+ control: controlSummaryOutput(),
273
+ ...statusImpactOutput,
274
+ note: zod_1.z.string(),
275
+ };
276
+ exports.updateAttestationOutput = {
277
+ outcome: zod_1.z.string(), // updated | not_found
278
+ attestationId: zod_1.z.string().optional(),
279
+ attestation: attestationOutput().optional(),
280
+ control: controlLinkOutput().optional(),
281
+ ...statusImpactOutput,
282
+ subjectCollision: zod_1.z.looseObject({ id: str(), subject: str() }).optional(),
283
+ note: zod_1.z.string().optional(),
284
+ };
285
+ exports.revokeAttestationOutput = {
286
+ outcome: zod_1.z.string(), // revoked | not_found
287
+ attestationId: zod_1.z.string().optional(),
288
+ attestation: attestationOutput().optional(),
289
+ control: controlLinkOutput().optional(),
290
+ // no_longer_passing | still_passing | still_failing | now_passing | no_longer_failing | unknown
291
+ statusImpact: zod_1.z.string().optional(),
292
+ blockers: blockersOutput().optional(),
293
+ note: zod_1.z.string().optional(),
294
+ };
295
+ //# sourceMappingURL=schemas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../../../src/server/tools/compliance/schemas.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,8CAA8C;AAE9C,mGAAmG;AACnG,yFAAyF;AACzF,2FAA2F;AAC3F,MAAM,GAAG,GAAG,GAAG,EAAE,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,CAAC;AACvC,MAAM,GAAG,GAAG,GAAG,EAAE,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,CAAC;AAEvC,MAAM,iBAAiB,GAAG,GAAG,EAAE,CAC7B,OAAC,CAAC,WAAW,CAAC;IACZ,EAAE,EAAE,GAAG,EAAE;IACT,OAAO,EAAE,GAAG,EAAE;IACd,KAAK,EAAE,GAAG,EAAE;IACZ,SAAS,EAAE,GAAG,EAAE;IAChB,YAAY,EAAE,GAAG,EAAE;IACnB,KAAK,EAAE,GAAG,EAAE;IACZ,MAAM,EAAE,GAAG,EAAE;IACb,YAAY,EAAE,GAAG,EAAE;IACnB,SAAS,EAAE,GAAG,EAAE;CACjB,CAAC,CAAC;AAEL,MAAM,cAAc,GAAG,GAAG,EAAE,CAC1B,OAAC,CAAC,KAAK,CACL,OAAC,CAAC,WAAW,CAAC;IACZ,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,EAAE,gDAAgD;IAClE,EAAE,EAAE,GAAG,EAAE;IACT,IAAI,EAAE,GAAG,EAAE;IACX,OAAO,EAAE,GAAG,EAAE;IACd,YAAY,EAAE,GAAG,EAAE;IACnB,KAAK,EAAE,GAAG,EAAE;CACb,CAAC,CACH,CAAC;AAEJ,MAAM,oBAAoB,GAAG,GAAG,EAAE,CAChC,OAAC,CAAC,WAAW,CAAC;IACZ,EAAE,EAAE,GAAG,EAAE;IACT,IAAI,EAAE,GAAG,EAAE;IACX,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IA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E;IACrC,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC5B,CAAC"}
@@ -0,0 +1,141 @@
1
+ import { z } from 'zod';
2
+ import type { JupiterOneClient } from '../../../client/jupiterone-client.js';
3
+ import type { Attestation, ControlFilterInput, ControlFramework, ControlListItem } from '../../../types/jupiterone.js';
4
+ import type { ToolResult } from '../types.js';
5
+ /**
6
+ * What every compliance tool shares: the time budgets and caps, deadline and timing helpers,
7
+ * refusals, app links, date helpers and the access-denied hint.
8
+ */
9
+ export declare const ACCESS_DENIED_HINT: string;
10
+ /** The characters the API rejects in a control id since apps PR #782 relaxed it (2026-10-13). */
11
+ export declare const CONTROL_ID_FORBIDDEN: RegExp;
12
+ /** Controls the summary names in its one graph read; the rest keep a null name. */
13
+ export declare const MAX_NAMED_CONTROLS = 100;
14
+ /** Control tests whose latest evaluation `get-control` looks up; later tests are `skipped`. */
15
+ export declare const MAX_EVALUATION_LOOKUPS = 10;
16
+ /** Failing controls whose requirements a summary drill reads; the rest are counted as skipped. */
17
+ export declare const MAX_REQUIREMENT_LOOKUPS = 50;
18
+ /** Frameworks per scorecard-counts read; the summary issues every chunk at once. */
19
+ export declare const STATS_CHUNK_SIZE = 10;
20
+ /** Expired attestations a summary lists, most recently expired first; past it, it says so. */
21
+ export declare const MAX_EXPIRED_ATTESTATIONS = 50;
22
+ /**
23
+ * get-control's evaluation lookups: the time they get once the control read returns, the read-side
24
+ * diagnosis budget (`DIAGNOSIS_BUDGET_MS`, value-probe.ts). A lookup still running at the deadline
25
+ * is abandoned as skipped.
26
+ */
27
+ export declare const READ_FANOUT_DEADLINE_MS = 20000;
28
+ /**
29
+ * The latest get-control's evaluation lookups may run, from request start, so the handler returns
30
+ * inside the remote's 55 s abort. Counted from request start alone, the lookup budget went to the
31
+ * control read: one read took 37.7 s on j1dev and every lookup was skipped (2026-10-14).
32
+ */
33
+ export declare const GET_CONTROL_DEADLINE_MS = 45000;
34
+ /**
35
+ * The latest an attestation write's read of its control may run, from request start. On j1dev
36
+ * every create and revoke that hit the remote's 55 s abort had in fact been written, and the caller
37
+ * saw an error for a write that landed (2026-10-15); past this the write answers without the read.
38
+ */
39
+ export declare const WRITE_READ_DEADLINE_MS = 45000;
40
+ /**
41
+ * Race deadline, from request start, for the summary's decoration reads: the drill's requirement
42
+ * lookups, its no-data count, and the expiring attestations' names and framework scope. At 20 s
43
+ * every one of four drills on j1dev skipped every lookup (2026-10-14): the framework list took
44
+ * 3.9–4.3 s and the failing-controls read 10.6–19.3 s before any lookup ran. The remote aborts at
45
+ * 55 s, and the one unraced read, the stats, took 29 s at worst on dev's 63 frameworks and runs in
46
+ * parallel with these.
47
+ */
48
+ export declare const SUMMARY_READ_DEADLINE_MS = 35000;
49
+ /** A daily-polled test fits in one page either way the backend sorts. */
50
+ export declare const EVALUATION_WINDOW_MS: number;
51
+ export declare const EVALUATION_PAGE_LIMIT = 50;
52
+ export declare const EVALUATION_FAILURE_TAG = "EVALUATION_FAILURE";
53
+ export declare const DEFAULT_EXPIRING_WITHIN_DAYS = 30;
54
+ export declare const FAILING_CONTROLS_PAGE_LIMIT = 250;
55
+ export declare const MAX_FAILING_CONTROL_PAGES = 2;
56
+ export declare const DEFAULT_CONTROL_PAGE_LIMIT = 50;
57
+ export declare const MAX_OU_NAMESPACES = 10;
58
+ export declare const CONTROL_SEARCH_PAGE_LIMIT = 50;
59
+ export declare const MAX_CONTROL_SEARCH_PAGES = 4;
60
+ /**
61
+ * Candidates an `ambiguous` outcome returns. A short name matches hundreds of controls or units,
62
+ * and past a couple of dozen the list stops helping the caller choose; `candidateCount` keeps the
63
+ * total.
64
+ */
65
+ export declare const MAX_CANDIDATES = 25;
66
+ /**
67
+ * The gateway's not-found rejection. Narrow on purpose: anything else is a real failure and must
68
+ * reach the generic envelope, not read as an absence.
69
+ */
70
+ export declare function isNotFound(error: unknown): boolean;
71
+ /**
72
+ * The one condition under which a compliance sub-call degrades instead of failing the tool: a
73
+ * refusal of the attestations read, which needs more permission than the rest of the response.
74
+ * `'unavailable'` means "could not read", never "none".
75
+ */
76
+ export declare function degradeOnAccessDenied(error: unknown): 'unavailable';
77
+ export declare const DEADLINE_PASSED: unique symbol;
78
+ /** Settle with the promise, or with DEADLINE_PASSED at `deadlineAt`, whichever comes first. */
79
+ export declare function withDeadline<T>(promise: Promise<T>, deadlineAt: number): Promise<T | typeof DEADLINE_PASSED>;
80
+ /**
81
+ * Wall time per phase of a read, in milliseconds, reported as `timingsMs`. On j1dev the bare
82
+ * summary took 39 s and list-controls 33 s with `limit: 1` (2026-10-14), and nothing showed which
83
+ * backend read spent it; phases that run concurrently each record their own wall time.
84
+ */
85
+ export type Timings = Record<string, number>;
86
+ export declare function timed<T>(timings: Timings, phase: string, work: () => Promise<T>): Promise<T>;
87
+ /**
88
+ * The account subdomain app links are built on, read once per call alongside the other reads. A
89
+ * failed read gives every link `''`, constructAppUrl's own "no link", rather than failing a read
90
+ * whose answer does not depend on its links.
91
+ */
92
+ export declare function readSubdomain(client: JupiterOneClient, timings?: Timings): Promise<string | undefined>;
93
+ /** The account subdomain, or none when its read is not back by `deadlineAt`. */
94
+ export declare function subdomainBy(read: Promise<string | undefined>, deadlineAt: number): Promise<string | undefined>;
95
+ /**
96
+ * CCM's app pages, at the routes the web app serves (`artifacts/app/src/views/controls`). The route
97
+ * loaders pass the id straight to the CCM API, so these ids work as given; they are encoded because
98
+ * UPLOAD and JSON control ids can carry spaces (`ccm_c_JSON_A.5.1 Policies`).
99
+ */
100
+ export declare function frameworkUrl(frameworkId: string, subdomain: string | undefined): string;
101
+ export declare function controlUrl(controlId: string | null | undefined, subdomain: string | undefined): string;
102
+ /**
103
+ * An error result whose text leads with its outcome word. Hosts that show an error's text alone
104
+ * never see `structuredContent`, and the tester reported twice that refusals carried no visible
105
+ * outcome (2026-10-14).
106
+ */
107
+ export declare function refusal(outcome: string, text: string, details?: Record<string, unknown>): ToolResult;
108
+ /** A cross-field input failure the schema cannot express. Nothing was called. */
109
+ export declare function validationError(text: string): ToolResult;
110
+ /** An API timestamp (epoch ms as a number or a digit string, or a date string) as ISO 8601. */
111
+ export declare function toIso(value: number | string | null | undefined): string | null;
112
+ export declare function projectAttestation(attestation: Attestation): {
113
+ id: string;
114
+ subject: string;
115
+ description: string | null;
116
+ state: import("../../../types/jupiterone.js").AttestationState;
117
+ expiresOn: number;
118
+ expiresOnIso: string | null;
119
+ owner: string | null;
120
+ author: string | null;
121
+ documentLink: string | null;
122
+ createdOn: string | null;
123
+ controlId: string | null;
124
+ };
125
+ export declare function frameworkNameMap(frameworks: ControlFramework[]): Map<string, string>;
126
+ export declare function namesFor(ids: string[] | null | undefined, names: Map<string, string>): (string | null)[];
127
+ /**
128
+ * Up to `maxPages` pages of controls matching `filter`. `complete` is false when the cap stopped
129
+ * the walk with pages left. A page that claims a successor without a cursor cannot be followed:
130
+ * re-requesting with no cursor would return the first page again as if it were the next.
131
+ */
132
+ export declare function walkControls(client: JupiterOneClient, filter: ControlFilterInput, page: {
133
+ limit: number;
134
+ maxPages: number;
135
+ }): Promise<{
136
+ items: ControlListItem[];
137
+ complete: boolean;
138
+ }>;
139
+ export type AttestationRead = Attestation[] | 'unavailable';
140
+ export declare const ownerEmail: () => z.ZodEmail;
141
+ //# sourceMappingURL=shared.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../../src/server/tools/compliance/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAE7E,OAAO,KAAK,EACV,WAAW,EACX,kBAAkB,EAClB,gBAAgB,EAChB,eAAe,EAChB,MAAM,8BAA8B,CAAC;AAItC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C;;;GAGG;AAKH,eAAO,MAAM,kBAAkB,QAIwD,CAAC;AAExF,iGAAiG;AACjG,eAAO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