@bryan-thompson/inspector-assessment-client 1.22.13 → 1.22.16
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/assets/{OAuthCallback-CZrJlcLn.js → OAuthCallback-DNYBkA2C.js} +1 -1
- package/dist/assets/{OAuthDebugCallback-DjI-YxME.js → OAuthDebugCallback-EhdSHXee.js} +1 -1
- package/dist/assets/{index-_w0OL9Gt.js → index-BRiFDs-g.js} +21 -14
- package/dist/index.html +1 -1
- package/lib/lib/assessment/configTypes.d.ts +70 -0
- package/lib/lib/assessment/configTypes.d.ts.map +1 -0
- package/lib/lib/assessment/configTypes.js +194 -0
- package/lib/lib/assessment/constants.d.ts +10 -0
- package/lib/lib/assessment/constants.d.ts.map +1 -0
- package/lib/lib/assessment/constants.js +61 -0
- package/lib/lib/assessment/coreTypes.d.ts +159 -0
- package/lib/lib/assessment/coreTypes.d.ts.map +1 -0
- package/lib/lib/assessment/coreTypes.js +101 -0
- package/lib/lib/assessment/extendedTypes.d.ts +415 -0
- package/lib/lib/assessment/extendedTypes.d.ts.map +1 -0
- package/lib/lib/assessment/extendedTypes.js +9 -0
- package/lib/lib/assessment/index.d.ts +23 -0
- package/lib/lib/assessment/index.d.ts.map +1 -0
- package/lib/lib/assessment/index.js +48 -0
- package/lib/lib/assessment/progressTypes.d.ts +160 -0
- package/lib/lib/assessment/progressTypes.d.ts.map +1 -0
- package/lib/lib/assessment/progressTypes.js +9 -0
- package/lib/lib/assessment/resultTypes.d.ts +568 -0
- package/lib/lib/assessment/resultTypes.d.ts.map +1 -0
- package/lib/lib/assessment/resultTypes.js +9 -0
- package/lib/lib/assessmentTypes.d.ts +20 -1248
- package/lib/lib/assessmentTypes.d.ts.map +1 -1
- package/lib/lib/assessmentTypes.js +21 -287
- package/lib/services/assessment/AssessmentOrchestrator.d.ts +5 -0
- package/lib/services/assessment/AssessmentOrchestrator.d.ts.map +1 -1
- package/lib/services/assessment/AssessmentOrchestrator.js +24 -6
- package/lib/services/assessment/lib/concurrencyLimit.d.ts +12 -0
- package/lib/services/assessment/lib/concurrencyLimit.d.ts.map +1 -1
- package/lib/services/assessment/lib/concurrencyLimit.js +22 -0
- package/lib/services/assessment/lib/logger.d.ts +98 -0
- package/lib/services/assessment/lib/logger.d.ts.map +1 -0
- package/lib/services/assessment/lib/logger.js +153 -0
- package/lib/services/assessment/modules/BaseAssessor.d.ts +2 -2
- package/lib/services/assessment/modules/BaseAssessor.d.ts.map +1 -1
- package/lib/services/assessment/modules/SecurityAssessor.d.ts.map +1 -1
- package/lib/services/assessment/modules/SecurityAssessor.js +10 -5
- package/lib/services/assessment/modules/ToolAnnotationAssessor.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Progress Event Types
|
|
3
|
+
*
|
|
4
|
+
* Types for real-time test progress tracking during assessment.
|
|
5
|
+
* Used by CLI to emit batched JSONL events.
|
|
6
|
+
*
|
|
7
|
+
* @module assessment/progressTypes
|
|
8
|
+
*/
|
|
9
|
+
import type { AssessmentStatus, InferenceConfidence } from "./coreTypes.js";
|
|
10
|
+
/**
|
|
11
|
+
* Progress callback for assessment modules to report test execution progress.
|
|
12
|
+
* Used by CLI to emit batched JSONL events.
|
|
13
|
+
*/
|
|
14
|
+
export interface ProgressCallback {
|
|
15
|
+
(event: ProgressEvent): void;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Union type for all progress events emitted during assessment.
|
|
19
|
+
*/
|
|
20
|
+
export type ProgressEvent = ModuleStartedProgress | TestBatchProgress | ModuleCompleteProgress | VulnerabilityFoundProgress | AnnotationMissingProgress | AnnotationMisalignedProgress | AnnotationReviewRecommendedProgress | AnnotationPoisonedProgress | AnnotationAlignedProgress;
|
|
21
|
+
/**
|
|
22
|
+
* Emitted when an assessment module begins execution.
|
|
23
|
+
*/
|
|
24
|
+
export interface ModuleStartedProgress {
|
|
25
|
+
type: "module_started";
|
|
26
|
+
module: string;
|
|
27
|
+
estimatedTests: number;
|
|
28
|
+
toolCount: number;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Emitted periodically during module execution with batched test results.
|
|
32
|
+
* Batching reduces event volume for large assessments.
|
|
33
|
+
*/
|
|
34
|
+
export interface TestBatchProgress {
|
|
35
|
+
type: "test_batch";
|
|
36
|
+
module: string;
|
|
37
|
+
completed: number;
|
|
38
|
+
total: number;
|
|
39
|
+
batchSize: number;
|
|
40
|
+
elapsed: number;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Emitted when an assessment module completes with final stats.
|
|
44
|
+
*/
|
|
45
|
+
export interface ModuleCompleteProgress {
|
|
46
|
+
type: "module_complete";
|
|
47
|
+
module: string;
|
|
48
|
+
status: AssessmentStatus;
|
|
49
|
+
score: number;
|
|
50
|
+
testsRun: number;
|
|
51
|
+
duration: number;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Emitted when a security vulnerability is detected during assessment.
|
|
55
|
+
* Provides real-time alerts for security findings.
|
|
56
|
+
*/
|
|
57
|
+
export interface VulnerabilityFoundProgress {
|
|
58
|
+
type: "vulnerability_found";
|
|
59
|
+
tool: string;
|
|
60
|
+
pattern: string;
|
|
61
|
+
confidence: "high" | "medium" | "low";
|
|
62
|
+
evidence: string;
|
|
63
|
+
riskLevel: "HIGH" | "MEDIUM" | "LOW";
|
|
64
|
+
requiresReview: boolean;
|
|
65
|
+
payload?: string;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Tool parameter metadata for annotation events.
|
|
69
|
+
* Reusable type matching jsonl-events.ts ToolParam.
|
|
70
|
+
*/
|
|
71
|
+
export interface ToolParamProgress {
|
|
72
|
+
name: string;
|
|
73
|
+
type: string;
|
|
74
|
+
required: boolean;
|
|
75
|
+
description?: string;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Emitted when a tool is missing required annotations.
|
|
79
|
+
* Provides real-time alerts during annotation assessment.
|
|
80
|
+
*/
|
|
81
|
+
export interface AnnotationMissingProgress {
|
|
82
|
+
type: "annotation_missing";
|
|
83
|
+
tool: string;
|
|
84
|
+
title?: string;
|
|
85
|
+
description?: string;
|
|
86
|
+
parameters: ToolParamProgress[];
|
|
87
|
+
inferredBehavior: {
|
|
88
|
+
expectedReadOnly: boolean;
|
|
89
|
+
expectedDestructive: boolean;
|
|
90
|
+
reason: string;
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Emitted when tool annotations don't match inferred behavior.
|
|
95
|
+
* Provides real-time alerts during annotation assessment.
|
|
96
|
+
*/
|
|
97
|
+
export interface AnnotationMisalignedProgress {
|
|
98
|
+
type: "annotation_misaligned";
|
|
99
|
+
tool: string;
|
|
100
|
+
title?: string;
|
|
101
|
+
description?: string;
|
|
102
|
+
parameters: ToolParamProgress[];
|
|
103
|
+
field: "readOnlyHint" | "destructiveHint";
|
|
104
|
+
actual: boolean | undefined;
|
|
105
|
+
expected: boolean;
|
|
106
|
+
confidence: number;
|
|
107
|
+
reason: string;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Emitted when annotation alignment cannot be confidently determined.
|
|
111
|
+
* Used for ambiguous patterns like store_*, queue_*, cache_* where behavior
|
|
112
|
+
* varies by implementation context. Does not indicate a failure - just flags
|
|
113
|
+
* for human review.
|
|
114
|
+
*/
|
|
115
|
+
export interface AnnotationReviewRecommendedProgress {
|
|
116
|
+
type: "annotation_review_recommended";
|
|
117
|
+
tool: string;
|
|
118
|
+
title?: string;
|
|
119
|
+
description?: string;
|
|
120
|
+
parameters: ToolParamProgress[];
|
|
121
|
+
field: "readOnlyHint" | "destructiveHint";
|
|
122
|
+
actual: boolean | undefined;
|
|
123
|
+
inferred: boolean;
|
|
124
|
+
confidence: InferenceConfidence;
|
|
125
|
+
isAmbiguous: boolean;
|
|
126
|
+
reason: string;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Emitted when tool description contains poisoning patterns (Issue #8).
|
|
130
|
+
* Indicates potential prompt injection or malicious instructions in tool metadata.
|
|
131
|
+
*/
|
|
132
|
+
export interface AnnotationPoisonedProgress {
|
|
133
|
+
type: "annotation_poisoned";
|
|
134
|
+
tool: string;
|
|
135
|
+
description?: string;
|
|
136
|
+
patterns: Array<{
|
|
137
|
+
name: string;
|
|
138
|
+
pattern: string;
|
|
139
|
+
severity: "LOW" | "MEDIUM" | "HIGH";
|
|
140
|
+
category: string;
|
|
141
|
+
evidence: string;
|
|
142
|
+
}>;
|
|
143
|
+
riskLevel: "NONE" | "LOW" | "MEDIUM" | "HIGH";
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Emitted when tool annotations correctly match inferred behavior.
|
|
147
|
+
* Provides real-time confirmation during annotation assessment.
|
|
148
|
+
*/
|
|
149
|
+
export interface AnnotationAlignedProgress {
|
|
150
|
+
type: "annotation_aligned";
|
|
151
|
+
tool: string;
|
|
152
|
+
confidence: "high" | "medium" | "low";
|
|
153
|
+
annotations: {
|
|
154
|
+
readOnlyHint?: boolean;
|
|
155
|
+
destructiveHint?: boolean;
|
|
156
|
+
openWorldHint?: boolean;
|
|
157
|
+
idempotentHint?: boolean;
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
//# sourceMappingURL=progressTypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progressTypes.d.ts","sourceRoot":"","sources":["../../../src/lib/assessment/progressTypes.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEzE;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI,CAAC;CAC9B;AAED;;GAEG;AACH,MAAM,MAAM,aAAa,GACrB,qBAAqB,GACrB,iBAAiB,GACjB,sBAAsB,GACtB,0BAA0B,G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