monora-ai 2.1.0 → 2.1.3
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 +333 -159
- package/dist/aims_governance.d.ts +238 -0
- package/dist/aims_governance.d.ts.map +1 -0
- package/dist/aims_governance.js +922 -0
- package/dist/alerts.d.ts +16 -0
- package/dist/alerts.d.ts.map +1 -1
- package/dist/alerts.js +16 -0
- package/dist/api.d.ts +6 -0
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +6 -0
- package/dist/assessment.d.ts +85 -0
- package/dist/assessment.d.ts.map +1 -1
- package/dist/assessment.js +506 -13
- package/dist/attribution.d.ts +44 -3
- package/dist/attribution.d.ts.map +1 -1
- package/dist/attribution.js +197 -10
- package/dist/autodetect.d.ts +68 -0
- package/dist/autodetect.d.ts.map +1 -1
- package/dist/autodetect.js +639 -0
- package/dist/bias.d.ts +130 -0
- package/dist/bias.d.ts.map +1 -0
- package/dist/bias.js +223 -0
- package/dist/cli/diagnostics.d.ts +5 -1
- package/dist/cli/diagnostics.d.ts.map +1 -1
- package/dist/cli/diagnostics.js +23 -6
- package/dist/cli/doctor.d.ts +25 -0
- package/dist/cli/doctor.d.ts.map +1 -0
- package/dist/cli/doctor.js +381 -0
- package/dist/cli/fix.d.ts +16 -0
- package/dist/cli/fix.d.ts.map +1 -0
- package/dist/cli/fix.js +284 -0
- package/dist/cli/init.d.ts +57 -0
- package/dist/cli/init.d.ts.map +1 -0
- package/dist/cli/init.js +205 -0
- package/dist/cli.js +1550 -176
- package/dist/complianceTargets.d.ts +111 -0
- package/dist/complianceTargets.d.ts.map +1 -0
- package/dist/complianceTargets.js +521 -0
- package/dist/config.d.ts +261 -16
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +381 -32
- package/dist/config_migrations.d.ts.map +1 -1
- package/dist/config_migrations.js +38 -1
- package/dist/config_schema.d.ts +2490 -1035
- package/dist/config_schema.d.ts.map +1 -1
- package/dist/config_schema.js +233 -64
- package/dist/context.d.ts +34 -0
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +118 -7
- package/dist/control_backbone.d.ts +122 -0
- package/dist/control_backbone.d.ts.map +1 -0
- package/dist/control_backbone.js +698 -0
- package/dist/data-governance.d.ts +187 -0
- package/dist/data-governance.d.ts.map +1 -0
- package/dist/data-governance.js +424 -0
- package/dist/dataResidency.d.ts +44 -0
- package/dist/dataResidency.d.ts.map +1 -0
- package/dist/dataResidency.js +203 -0
- package/dist/dispatcher.d.ts.map +1 -1
- package/dist/dispatcher.js +17 -5
- package/dist/evidence_store.d.ts +103 -0
- package/dist/evidence_store.d.ts.map +1 -0
- package/dist/evidence_store.js +459 -0
- package/dist/executiveSummary.d.ts +15 -0
- package/dist/executiveSummary.d.ts.map +1 -1
- package/dist/executiveSummary.js +135 -22
- package/dist/identity.d.ts +143 -0
- package/dist/identity.d.ts.map +1 -0
- package/dist/identity.js +231 -0
- package/dist/impact-assessment.d.ts +350 -0
- package/dist/impact-assessment.d.ts.map +1 -0
- package/dist/impact-assessment.js +580 -0
- package/dist/index.d.ts +20 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +247 -5
- package/dist/instrumentation.d.ts +1 -1
- package/dist/instrumentation.d.ts.map +1 -1
- package/dist/instrumentation.js +123 -22
- package/dist/integrations/anthropic.d.ts +3 -0
- package/dist/integrations/anthropic.d.ts.map +1 -1
- package/dist/integrations/anthropic.js +282 -80
- package/dist/integrations/governance.d.ts +33 -0
- package/dist/integrations/governance.d.ts.map +1 -0
- package/dist/integrations/governance.js +208 -0
- package/dist/integrations/langchain.d.ts +4 -0
- package/dist/integrations/langchain.d.ts.map +1 -1
- package/dist/integrations/langchain.js +362 -142
- package/dist/integrations/openai.d.ts +9 -0
- package/dist/integrations/openai.d.ts.map +1 -1
- package/dist/integrations/openai.js +673 -73
- package/dist/iso42001_consolidation.d.ts +16 -0
- package/dist/iso42001_consolidation.d.ts.map +1 -0
- package/dist/iso42001_consolidation.js +413 -0
- package/dist/iso42001_workflows.d.ts +263 -0
- package/dist/iso42001_workflows.d.ts.map +1 -0
- package/dist/iso42001_workflows.js +781 -0
- package/dist/lifecycle.d.ts +299 -0
- package/dist/lifecycle.d.ts.map +1 -0
- package/dist/lifecycle.js +624 -0
- package/dist/lineage.d.ts +2 -2
- package/dist/lineage.d.ts.map +1 -1
- package/dist/lineage.js +9 -16
- package/dist/middleware/express.d.ts.map +1 -1
- package/dist/middleware/express.js +18 -3
- package/dist/middleware/nextjs.js +2 -2
- package/dist/model.d.ts +143 -0
- package/dist/model.d.ts.map +1 -0
- package/dist/model.js +371 -0
- package/dist/onboarding.d.ts +42 -0
- package/dist/onboarding.d.ts.map +1 -0
- package/dist/onboarding.js +1022 -0
- package/dist/oversight.d.ts +264 -0
- package/dist/oversight.d.ts.map +1 -0
- package/dist/oversight.js +497 -0
- package/dist/presets.js +7 -7
- package/dist/quotas.d.ts +171 -0
- package/dist/quotas.d.ts.map +1 -0
- package/dist/quotas.js +259 -0
- package/dist/register.d.ts +13 -0
- package/dist/register.d.ts.map +1 -0
- package/dist/register.js +99 -0
- package/dist/registry.d.ts +1 -0
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +7 -0
- package/dist/registryData.json +43 -6
- package/dist/report.d.ts +2 -1
- package/dist/report.d.ts.map +1 -1
- package/dist/report.js +189 -2
- package/dist/reporting.d.ts +125 -0
- package/dist/reporting.d.ts.map +1 -1
- package/dist/reporting.js +192 -2
- package/dist/resources.d.ts +285 -0
- package/dist/resources.d.ts.map +1 -0
- package/dist/resources.js +643 -0
- package/dist/risk.d.ts +120 -0
- package/dist/risk.d.ts.map +1 -0
- package/dist/risk.js +220 -0
- package/dist/runtime.d.ts +73 -0
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +415 -18
- package/dist/schemaInference.d.ts +92 -0
- package/dist/schemaInference.d.ts.map +1 -0
- package/dist/schemaInference.js +466 -0
- package/dist/schema_validation.js +2 -2
- package/dist/schemas/config.schema.json +118 -4
- package/dist/security_report.js +4 -4
- package/dist/signing.d.ts +1 -1
- package/dist/signing.d.ts.map +1 -1
- package/dist/signing.js +4 -0
- package/dist/sinks/file.d.ts +19 -1
- package/dist/sinks/file.d.ts.map +1 -1
- package/dist/sinks/file.js +82 -13
- package/dist/sinks/https.d.ts +10 -0
- package/dist/sinks/https.d.ts.map +1 -1
- package/dist/sinks/https.js +76 -16
- package/dist/sinks/stdout.d.ts +1 -0
- package/dist/sinks/stdout.d.ts.map +1 -1
- package/dist/sinks/stdout.js +12 -1
- package/dist/spec.d.ts +159 -0
- package/dist/spec.d.ts.map +1 -0
- package/dist/spec.js +391 -0
- package/dist/stakeholders.d.ts +199 -0
- package/dist/stakeholders.d.ts.map +1 -0
- package/dist/stakeholders.js +398 -0
- package/dist/standards.d.ts.map +1 -1
- package/dist/standards.js +160 -2
- package/dist/standards_ingest.d.ts.map +1 -1
- package/dist/standards_ingest.js +1 -4
- package/dist/telemetry.d.ts +16 -2
- package/dist/telemetry.d.ts.map +1 -1
- package/dist/telemetry.js +77 -14
- package/dist/templates/controls/iso42001_control_catalog.json +1443 -0
- package/dist/traced_emitter.d.ts.map +1 -1
- package/dist/traced_emitter.js +19 -9
- package/dist/trust_package.d.ts +19 -1
- package/dist/trust_package.d.ts.map +1 -1
- package/dist/trust_package.js +89 -2
- package/dist/verify.d.ts.map +1 -1
- package/dist/verify.js +9 -2
- package/dist/wal.d.ts.map +1 -1
- package/dist/wal.js +2 -1
- package/package.json +14 -1
- package/scripts/postinstall.js +105 -210
- package/templates/controls/iso42001_control_catalog.json +1443 -0
|
@@ -0,0 +1,350 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI Impact Assessment for ISO 42001 A.5 compliance.
|
|
3
|
+
*
|
|
4
|
+
* This module provides AI Impact Assessment (AIIA) management supporting
|
|
5
|
+
* ISO 42001 controls A.5.2 (process), A.5.3 (documentation), A.5.4 (individual
|
|
6
|
+
* impacts), and A.5.5 (societal impacts).
|
|
7
|
+
*
|
|
8
|
+
* Cross-SDK Parity:
|
|
9
|
+
* Both Python and Node.js SDKs provide identical impact assessment APIs:
|
|
10
|
+
* - createImpactAssessment() / create_impact_assessment()
|
|
11
|
+
* - addImpactRecord() / add_impact_record()
|
|
12
|
+
* - addMitigation() / add_mitigation()
|
|
13
|
+
* - submitForApproval() / submit_for_approval()
|
|
14
|
+
* - recordApproval() / record_approval()
|
|
15
|
+
* - finalizeAssessment() / finalize_assessment()
|
|
16
|
+
*/
|
|
17
|
+
import { MonoraConfig } from './config';
|
|
18
|
+
export type Likelihood = 'rare' | 'unlikely' | 'possible' | 'likely' | 'certain';
|
|
19
|
+
export type Severity = 'minimal' | 'minor' | 'moderate' | 'major' | 'catastrophic';
|
|
20
|
+
export type ImpactCategory = 'fairness' | 'privacy' | 'safety' | 'autonomy' | 'economic' | 'environmental';
|
|
21
|
+
export type AssessmentStatus = 'draft' | 'review' | 'approved' | 'archived';
|
|
22
|
+
export type MitigationEffectiveness = 'partial' | 'substantial' | 'complete';
|
|
23
|
+
export type MitigationStatus = 'planned' | 'in_progress' | 'implemented' | 'verified';
|
|
24
|
+
export type ImpactType = 'individual' | 'societal';
|
|
25
|
+
/**
|
|
26
|
+
* A single impact assessment record (individual or societal).
|
|
27
|
+
*/
|
|
28
|
+
export interface ImpactRecord {
|
|
29
|
+
/** Unique identifier for this impact record */
|
|
30
|
+
impactId: string;
|
|
31
|
+
/** Impact category */
|
|
32
|
+
category: ImpactCategory;
|
|
33
|
+
/** Detailed description of the potential impact */
|
|
34
|
+
description: string;
|
|
35
|
+
/** Probability of occurrence */
|
|
36
|
+
likelihood: Likelihood;
|
|
37
|
+
/** Severity if the impact occurs */
|
|
38
|
+
severity: Severity;
|
|
39
|
+
/** Computed risk score (likelihood * severity, 1-25) */
|
|
40
|
+
riskScore: number;
|
|
41
|
+
/** Groups or individuals who may be affected */
|
|
42
|
+
affectedParties: string[];
|
|
43
|
+
/** Whether this is an individual or societal impact */
|
|
44
|
+
impactType: ImpactType;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Convert impact record to dictionary for serialization.
|
|
48
|
+
*/
|
|
49
|
+
export declare function impactRecordToDict(record: ImpactRecord): Record<string, any>;
|
|
50
|
+
/**
|
|
51
|
+
* A risk mitigation measure.
|
|
52
|
+
*/
|
|
53
|
+
export interface Mitigation {
|
|
54
|
+
/** Unique identifier */
|
|
55
|
+
mitigationId: string;
|
|
56
|
+
/** Category of risk being mitigated */
|
|
57
|
+
riskCategory: string;
|
|
58
|
+
/** Description of the mitigation measure */
|
|
59
|
+
description: string;
|
|
60
|
+
/** Expected effectiveness of the mitigation */
|
|
61
|
+
effectiveness: MitigationEffectiveness;
|
|
62
|
+
/** Current implementation status */
|
|
63
|
+
implementationStatus: MitigationStatus;
|
|
64
|
+
/** Person/team responsible for implementation */
|
|
65
|
+
owner: string;
|
|
66
|
+
/** List of impact_ids this mitigation addresses */
|
|
67
|
+
targetImpacts: string[];
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Convert mitigation to dictionary for serialization.
|
|
71
|
+
*/
|
|
72
|
+
export declare function mitigationToDict(mitigation: Mitigation): Record<string, any>;
|
|
73
|
+
/**
|
|
74
|
+
* An approval sign-off on the assessment.
|
|
75
|
+
*/
|
|
76
|
+
export interface Approval {
|
|
77
|
+
/** Role of the approver (ai_governance, legal, ethics_board) */
|
|
78
|
+
approverRole: string;
|
|
79
|
+
/** Name of the person approving */
|
|
80
|
+
approverName: string;
|
|
81
|
+
/** Timestamp of approval */
|
|
82
|
+
approvedAt: string;
|
|
83
|
+
/** Optional approval comments */
|
|
84
|
+
comments?: string;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Convert approval to dictionary for serialization.
|
|
88
|
+
*/
|
|
89
|
+
export declare function approvalToDict(approval: Approval): Record<string, any>;
|
|
90
|
+
/**
|
|
91
|
+
* Complete AI Impact Assessment (AIIA) for ISO 42001 A.5.
|
|
92
|
+
*/
|
|
93
|
+
export interface AIImpactAssessment {
|
|
94
|
+
/** Unique identifier for this assessment */
|
|
95
|
+
assessmentId: string;
|
|
96
|
+
/** ID of the AI system being assessed */
|
|
97
|
+
systemId: string;
|
|
98
|
+
/** Date assessment was created */
|
|
99
|
+
assessmentDate: string;
|
|
100
|
+
/** Person conducting the assessment */
|
|
101
|
+
assessor: string;
|
|
102
|
+
/** Version of this assessment */
|
|
103
|
+
version: string;
|
|
104
|
+
/** Current status */
|
|
105
|
+
status: AssessmentStatus;
|
|
106
|
+
/** Purpose of the AI system */
|
|
107
|
+
intendedPurpose: string;
|
|
108
|
+
/** Context in which the system will be deployed */
|
|
109
|
+
deploymentContext: string;
|
|
110
|
+
/** Groups that may be affected by the system */
|
|
111
|
+
affectedGroups: string[];
|
|
112
|
+
/** List of individual impact assessments (A.5.4) */
|
|
113
|
+
individualImpacts: ImpactRecord[];
|
|
114
|
+
/** List of societal impact assessments (A.5.5) */
|
|
115
|
+
societalImpacts: ImpactRecord[];
|
|
116
|
+
/** Mitigation measures for identified risks */
|
|
117
|
+
riskMitigations: Mitigation[];
|
|
118
|
+
/** Risks remaining after mitigation */
|
|
119
|
+
residualRisks: string[];
|
|
120
|
+
/** Sign-offs from required approvers */
|
|
121
|
+
approvals: Approval[];
|
|
122
|
+
/** Timestamp of creation */
|
|
123
|
+
createdAt: string;
|
|
124
|
+
/** Timestamp of last update */
|
|
125
|
+
updatedAt: string;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Convert assessment to dictionary for serialization.
|
|
129
|
+
*/
|
|
130
|
+
export declare function assessmentToDict(assessment: AIImpactAssessment): Record<string, any>;
|
|
131
|
+
/**
|
|
132
|
+
* Calculate risk score from likelihood and severity.
|
|
133
|
+
*
|
|
134
|
+
* Uses a 5x5 risk matrix where score = likelihood_weight * severity_weight.
|
|
135
|
+
*
|
|
136
|
+
* @param likelihood - Probability of occurrence
|
|
137
|
+
* @param severity - Severity if impact occurs
|
|
138
|
+
* @returns Risk score from 1 (rare/minimal) to 25 (certain/catastrophic)
|
|
139
|
+
*/
|
|
140
|
+
export declare function calculateRiskScore(likelihood: Likelihood, severity: Severity): number;
|
|
141
|
+
/**
|
|
142
|
+
* Options for creating an impact assessment.
|
|
143
|
+
*/
|
|
144
|
+
export interface CreateImpactAssessmentOptions {
|
|
145
|
+
/** ID of the AI system being assessed */
|
|
146
|
+
systemId: string;
|
|
147
|
+
/** Person conducting the assessment */
|
|
148
|
+
assessor: string;
|
|
149
|
+
/** Purpose of the AI system */
|
|
150
|
+
intendedPurpose: string;
|
|
151
|
+
/** Context of deployment */
|
|
152
|
+
deploymentContext: string;
|
|
153
|
+
/** Groups that may be affected */
|
|
154
|
+
affectedGroups?: string[];
|
|
155
|
+
/** Assessment version */
|
|
156
|
+
version?: string;
|
|
157
|
+
/** Optional config */
|
|
158
|
+
config?: MonoraConfig;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Create a new AI Impact Assessment.
|
|
162
|
+
*
|
|
163
|
+
* @param options - Assessment creation options
|
|
164
|
+
* @returns A new AIImpactAssessment in draft status
|
|
165
|
+
*
|
|
166
|
+
* @example
|
|
167
|
+
* ```typescript
|
|
168
|
+
* const assessment = createImpactAssessment({
|
|
169
|
+
* systemId: 'chatbot-v2',
|
|
170
|
+
* assessor: 'Jane Doe',
|
|
171
|
+
* intendedPurpose: 'Customer support automation',
|
|
172
|
+
* deploymentContext: 'Web and mobile applications',
|
|
173
|
+
* affectedGroups: ['customers', 'support_staff']
|
|
174
|
+
* });
|
|
175
|
+
* ```
|
|
176
|
+
*/
|
|
177
|
+
export declare function createImpactAssessment(options: CreateImpactAssessmentOptions): AIImpactAssessment;
|
|
178
|
+
/**
|
|
179
|
+
* Options for adding an impact record.
|
|
180
|
+
*/
|
|
181
|
+
export interface AddImpactRecordOptions {
|
|
182
|
+
/** ID of the assessment to update */
|
|
183
|
+
assessmentId: string;
|
|
184
|
+
/** Impact category */
|
|
185
|
+
category: ImpactCategory;
|
|
186
|
+
/** Description of the potential impact */
|
|
187
|
+
description: string;
|
|
188
|
+
/** Probability of occurrence */
|
|
189
|
+
likelihood: Likelihood;
|
|
190
|
+
/** Severity if impact occurs */
|
|
191
|
+
severity: Severity;
|
|
192
|
+
/** Groups/individuals affected */
|
|
193
|
+
affectedParties?: string[];
|
|
194
|
+
/** Whether individual or societal impact */
|
|
195
|
+
impactType?: ImpactType;
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Add an impact record to an assessment.
|
|
199
|
+
*
|
|
200
|
+
* @param options - Impact record options
|
|
201
|
+
* @returns The created ImpactRecord
|
|
202
|
+
* @throws Error if assessment not found or not in draft status
|
|
203
|
+
*/
|
|
204
|
+
export declare function addImpactRecord(options: AddImpactRecordOptions): ImpactRecord;
|
|
205
|
+
/**
|
|
206
|
+
* Options for adding a mitigation.
|
|
207
|
+
*/
|
|
208
|
+
export interface AddMitigationOptions {
|
|
209
|
+
/** ID of the assessment to update */
|
|
210
|
+
assessmentId: string;
|
|
211
|
+
/** Category of risk being mitigated */
|
|
212
|
+
riskCategory: string;
|
|
213
|
+
/** Description of the mitigation measure */
|
|
214
|
+
description: string;
|
|
215
|
+
/** Expected effectiveness */
|
|
216
|
+
effectiveness: MitigationEffectiveness;
|
|
217
|
+
/** Current implementation status */
|
|
218
|
+
implementationStatus: MitigationStatus;
|
|
219
|
+
/** Person/team responsible */
|
|
220
|
+
owner: string;
|
|
221
|
+
/** List of impact_ids this addresses */
|
|
222
|
+
targetImpacts?: string[];
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* Add a risk mitigation to an assessment.
|
|
226
|
+
*
|
|
227
|
+
* @param options - Mitigation options
|
|
228
|
+
* @returns The created Mitigation
|
|
229
|
+
* @throws Error if assessment not found or not in draft status
|
|
230
|
+
*/
|
|
231
|
+
export declare function addMitigation(options: AddMitigationOptions): Mitigation;
|
|
232
|
+
/**
|
|
233
|
+
* Add a residual risk to an assessment.
|
|
234
|
+
*
|
|
235
|
+
* @param assessmentId - ID of the assessment to update
|
|
236
|
+
* @param riskDescription - Description of the residual risk
|
|
237
|
+
* @throws Error if assessment not found or not in draft status
|
|
238
|
+
*/
|
|
239
|
+
export declare function addResidualRisk(assessmentId: string, riskDescription: string): void;
|
|
240
|
+
/**
|
|
241
|
+
* Validate that an assessment has all required fields.
|
|
242
|
+
*
|
|
243
|
+
* @param assessment - The assessment to validate
|
|
244
|
+
* @returns List of validation errors (empty if valid)
|
|
245
|
+
*/
|
|
246
|
+
export declare function validateAssessmentCompleteness(assessment: AIImpactAssessment): string[];
|
|
247
|
+
/**
|
|
248
|
+
* Submit an assessment for approval review.
|
|
249
|
+
*
|
|
250
|
+
* Changes status from 'draft' to 'review'.
|
|
251
|
+
*
|
|
252
|
+
* @param assessmentId - ID of the assessment to submit
|
|
253
|
+
* @returns The updated assessment
|
|
254
|
+
* @throws Error if assessment not found or not in draft status
|
|
255
|
+
*/
|
|
256
|
+
export declare function submitForApproval(assessmentId: string): AIImpactAssessment;
|
|
257
|
+
/**
|
|
258
|
+
* Options for recording an approval.
|
|
259
|
+
*/
|
|
260
|
+
export interface RecordApprovalOptions {
|
|
261
|
+
/** ID of the assessment */
|
|
262
|
+
assessmentId: string;
|
|
263
|
+
/** Role of the approver */
|
|
264
|
+
approverRole: string;
|
|
265
|
+
/** Name of the person approving */
|
|
266
|
+
approverName: string;
|
|
267
|
+
/** Optional comments */
|
|
268
|
+
comments?: string;
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* Record an approval sign-off on an assessment.
|
|
272
|
+
*
|
|
273
|
+
* @param options - Approval options
|
|
274
|
+
* @returns The created Approval
|
|
275
|
+
* @throws Error if assessment not found or not in review status
|
|
276
|
+
*/
|
|
277
|
+
export declare function recordApproval(options: RecordApprovalOptions): Approval;
|
|
278
|
+
/**
|
|
279
|
+
* Finalize an assessment, marking it as approved.
|
|
280
|
+
*
|
|
281
|
+
* Validates that all required approvals are present.
|
|
282
|
+
*
|
|
283
|
+
* @param assessmentId - ID of the assessment to finalize
|
|
284
|
+
* @param config - Optional config for required approvals
|
|
285
|
+
* @returns The finalized assessment
|
|
286
|
+
* @throws Error if assessment not found, not in review, or missing approvals
|
|
287
|
+
*/
|
|
288
|
+
export declare function finalizeAssessment(assessmentId: string, config?: MonoraConfig): AIImpactAssessment;
|
|
289
|
+
/**
|
|
290
|
+
* Archive an approved assessment.
|
|
291
|
+
*
|
|
292
|
+
* @param assessmentId - ID of the assessment to archive
|
|
293
|
+
* @returns The archived assessment
|
|
294
|
+
* @throws Error if assessment not found or not approved
|
|
295
|
+
*/
|
|
296
|
+
export declare function archiveAssessment(assessmentId: string): AIImpactAssessment;
|
|
297
|
+
/**
|
|
298
|
+
* Get an assessment by ID.
|
|
299
|
+
*
|
|
300
|
+
* @param assessmentId - ID of the assessment
|
|
301
|
+
* @returns The assessment if found, undefined otherwise
|
|
302
|
+
*/
|
|
303
|
+
export declare function getAssessment(assessmentId: string): AIImpactAssessment | undefined;
|
|
304
|
+
/**
|
|
305
|
+
* Get all assessments for a system.
|
|
306
|
+
*
|
|
307
|
+
* @param systemId - ID of the AI system
|
|
308
|
+
* @returns List of assessments for the system
|
|
309
|
+
*/
|
|
310
|
+
export declare function getAssessmentsForSystem(systemId: string): AIImpactAssessment[];
|
|
311
|
+
/**
|
|
312
|
+
* Get all registered assessments.
|
|
313
|
+
*
|
|
314
|
+
* @returns List of all assessments
|
|
315
|
+
*/
|
|
316
|
+
export declare function getAllAssessments(): AIImpactAssessment[];
|
|
317
|
+
/**
|
|
318
|
+
* Clear all assessments from the registry.
|
|
319
|
+
*/
|
|
320
|
+
export declare function clearAssessments(): void;
|
|
321
|
+
/**
|
|
322
|
+
* Get a summary of an assessment for reporting.
|
|
323
|
+
*
|
|
324
|
+
* @param assessmentId - ID of the assessment
|
|
325
|
+
* @returns Summary dict with key metrics
|
|
326
|
+
*/
|
|
327
|
+
export declare function getAssessmentSummary(assessmentId: string): Record<string, any>;
|
|
328
|
+
/**
|
|
329
|
+
* Get aggregate report of all impact assessments.
|
|
330
|
+
*
|
|
331
|
+
* @param config - Optional config
|
|
332
|
+
* @returns Report dict for compliance reporting
|
|
333
|
+
*/
|
|
334
|
+
export declare function getImpactAssessmentReport(config?: MonoraConfig): Record<string, any>;
|
|
335
|
+
/**
|
|
336
|
+
* Check if a system has approved impact assessment for production.
|
|
337
|
+
*
|
|
338
|
+
* @param systemId - ID of the AI system
|
|
339
|
+
* @param config - Optional config
|
|
340
|
+
* @returns Object with readiness status and details
|
|
341
|
+
*/
|
|
342
|
+
export declare function checkProductionReadiness(systemId: string, config?: MonoraConfig): Record<string, any>;
|
|
343
|
+
/**
|
|
344
|
+
* Emit the current state of an assessment as an event.
|
|
345
|
+
*
|
|
346
|
+
* @param assessmentId - ID of the assessment to emit
|
|
347
|
+
* @param config - Optional config
|
|
348
|
+
*/
|
|
349
|
+
export declare function emitImpactAssessment(assessmentId: string, config?: MonoraConfig): void;
|
|
350
|
+
//# sourceMappingURL=impact-assessment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"impact-assessment.d.ts","sourceRoot":"","sources":["../src/impact-assessment.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAIxC,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,UAAU,GAAG,UAAU,GAAG,QAAQ,GAAG,SAAS,CAAC;AACjF,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,OAAO,GAAG,UAAU,GAAG,OAAO,GAAG,cAAc,CAAC;AACnF,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG,SAAS,GAAG,QAAQ,GAAG,UAAU,GAAG,UAAU,GAAG,eAAe,CAAC;AAC3G,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,QAAQ,GAAG,UAAU,GAAG,UAAU,CAAC;AAC5E,MAAM,MAAM,uBAAuB,GAAG,SAAS,GAAG,aAAa,GAAG,UAAU,CA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