monora-ai 2.1.0 → 2.1.4
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 +339 -158
- 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 +525 -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 +1564 -177
- package/dist/complianceConsolidation.d.ts +17 -0
- package/dist/complianceConsolidation.d.ts.map +1 -0
- package/dist/complianceConsolidation.js +68 -0
- 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 +128 -0
- package/dist/control_backbone.d.ts.map +1 -0
- package/dist/control_backbone.js +826 -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 +21 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +254 -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 +1075 -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 +74 -0
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +416 -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/gdpr_control_catalog.json +261 -0
- package/dist/templates/controls/iso42001_control_catalog.json +1443 -0
- package/dist/templates/controls/soc2_control_catalog.json +163 -0
- package/dist/templates/standards/iso42001_claims.json +72 -0
- package/dist/traced_emitter.d.ts.map +1 -1
- package/dist/traced_emitter.js +19 -9
- package/dist/trust_package.d.ts +20 -1
- package/dist/trust_package.d.ts.map +1 -1
- package/dist/trust_package.js +90 -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/gdpr_control_catalog.json +261 -0
- package/templates/controls/iso42001_control_catalog.json +1443 -0
- package/templates/controls/soc2_control_catalog.json +163 -0
- package/templates/standards/iso42001_claims.json +72 -0
package/dist/risk.d.ts
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI Risk Register for SOC 2 CC3 and ISO 42001 6.1 compliance.
|
|
3
|
+
*
|
|
4
|
+
* This module provides risk assessment management for AI models, supporting
|
|
5
|
+
* formal risk registers as required by SOC 2 and ISO 42001.
|
|
6
|
+
*
|
|
7
|
+
* Cross-SDK Parity:
|
|
8
|
+
* Both Python and Node.js SDKs provide identical risk register APIs:
|
|
9
|
+
* - getRiskAssessment() / get_risk_assessment()
|
|
10
|
+
* - registerModelRisk() / register_model_risk()
|
|
11
|
+
* - getRiskForEvent() / get_risk_for_event()
|
|
12
|
+
*/
|
|
13
|
+
import { MonoraConfig } from './config';
|
|
14
|
+
export type RiskLevel = 'low' | 'medium' | 'high' | 'critical';
|
|
15
|
+
/**
|
|
16
|
+
* Risk assessment for a specific AI model.
|
|
17
|
+
*/
|
|
18
|
+
export interface ModelRiskAssessment {
|
|
19
|
+
/** The model identifier */
|
|
20
|
+
model: string;
|
|
21
|
+
/** Risk classification */
|
|
22
|
+
riskLevel: RiskLevel;
|
|
23
|
+
/** Numeric risk score (0-100) */
|
|
24
|
+
riskScore: number;
|
|
25
|
+
/** Date of last assessment (ISO format) */
|
|
26
|
+
lastAssessed?: string;
|
|
27
|
+
/** Who performed the assessment */
|
|
28
|
+
assessor?: string;
|
|
29
|
+
/** List of controls applied to mitigate risk */
|
|
30
|
+
controls: string[];
|
|
31
|
+
/** Additional assessment notes */
|
|
32
|
+
notes?: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Convert assessment to dictionary for event inclusion.
|
|
36
|
+
*/
|
|
37
|
+
export declare function assessmentToDict(assessment: ModelRiskAssessment): Record<string, any>;
|
|
38
|
+
/**
|
|
39
|
+
* Get risk assessment for a model.
|
|
40
|
+
*
|
|
41
|
+
* Checks runtime registry first, then config-based registry.
|
|
42
|
+
*
|
|
43
|
+
* @param model - The model identifier to look up.
|
|
44
|
+
* @param config - Optional config (uses runtime state if not provided).
|
|
45
|
+
* @returns ModelRiskAssessment if found, undefined if not in registry.
|
|
46
|
+
*/
|
|
47
|
+
export declare function getRiskAssessment(model: string, config?: MonoraConfig): ModelRiskAssessment | undefined;
|
|
48
|
+
/**
|
|
49
|
+
* Options for registering model risk at runtime.
|
|
50
|
+
*/
|
|
51
|
+
export interface RegisterModelRiskOptions {
|
|
52
|
+
/** Risk classification */
|
|
53
|
+
riskLevel?: RiskLevel;
|
|
54
|
+
/** Numeric risk score (0-100) */
|
|
55
|
+
riskScore?: number;
|
|
56
|
+
/** List of controls applied */
|
|
57
|
+
controls?: string[];
|
|
58
|
+
/** Who performed the assessment */
|
|
59
|
+
assessor?: string;
|
|
60
|
+
/** Additional notes */
|
|
61
|
+
notes?: string;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Register a model risk assessment at runtime.
|
|
65
|
+
*
|
|
66
|
+
* Use this for dynamic model registration when models aren't known
|
|
67
|
+
* at configuration time.
|
|
68
|
+
*
|
|
69
|
+
* @param model - The model identifier.
|
|
70
|
+
* @param options - Risk assessment options.
|
|
71
|
+
* @returns The created ModelRiskAssessment.
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* ```typescript
|
|
75
|
+
* registerModelRisk('custom-fine-tuned-model', {
|
|
76
|
+
* riskLevel: 'medium',
|
|
77
|
+
* riskScore: 45,
|
|
78
|
+
* controls: ['output_filtering']
|
|
79
|
+
* });
|
|
80
|
+
* ```
|
|
81
|
+
*/
|
|
82
|
+
export declare function registerModelRisk(model: string, options?: RegisterModelRiskOptions): ModelRiskAssessment;
|
|
83
|
+
/**
|
|
84
|
+
* Remove a model from the runtime registry.
|
|
85
|
+
*
|
|
86
|
+
* @param model - The model identifier to remove.
|
|
87
|
+
* @returns True if removed, false if not found.
|
|
88
|
+
*/
|
|
89
|
+
export declare function unregisterModelRisk(model: string): boolean;
|
|
90
|
+
/**
|
|
91
|
+
* Clear all runtime risk registrations.
|
|
92
|
+
*/
|
|
93
|
+
export declare function clearRuntimeRegistry(): void;
|
|
94
|
+
/**
|
|
95
|
+
* Get risk assessment dict for event inclusion.
|
|
96
|
+
*
|
|
97
|
+
* This is called internally when building events to include risk
|
|
98
|
+
* assessment information according to the configuration.
|
|
99
|
+
*
|
|
100
|
+
* @param model - The model being used.
|
|
101
|
+
* @param config - The Monora configuration.
|
|
102
|
+
* @returns Risk assessment dict for event body, or undefined if disabled.
|
|
103
|
+
*/
|
|
104
|
+
export declare function getRiskForEvent(model: string, config: MonoraConfig): Record<string, any> | undefined;
|
|
105
|
+
/**
|
|
106
|
+
* Validate that model is allowed based on risk register.
|
|
107
|
+
*
|
|
108
|
+
* @param model - The model being used.
|
|
109
|
+
* @param config - The Monora configuration.
|
|
110
|
+
* @throws Error if block_unassessed is true and model not in register.
|
|
111
|
+
*/
|
|
112
|
+
export declare function validateModelRisk(model: string, config: MonoraConfig): void;
|
|
113
|
+
/**
|
|
114
|
+
* Get all registered model risk assessments.
|
|
115
|
+
*
|
|
116
|
+
* @param config - Optional config for config-based assessments.
|
|
117
|
+
* @returns List of all ModelRiskAssessment objects.
|
|
118
|
+
*/
|
|
119
|
+
export declare function getAllAssessments(config?: MonoraConfig): ModelRiskAssessment[];
|
|
120
|
+
//# sourceMappingURL=risk.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"risk.d.ts","sourceRoot":"","sources":["../src/risk.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAC;AAE/D;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,2BAA2B;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,0BAA0B;IAC1B,SAAS,EAAE,SAAS,CAAC;IACr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BAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,GAAG,IAAI,CAiB3E;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,CAAC,EAAE,YAAY,GAAG,mBAAmB,EAAE,CAwB9E"}
|
package/dist/risk.js
ADDED
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* AI Risk Register for SOC 2 CC3 and ISO 42001 6.1 compliance.
|
|
4
|
+
*
|
|
5
|
+
* This module provides risk assessment management for AI models, supporting
|
|
6
|
+
* formal risk registers as required by SOC 2 and ISO 42001.
|
|
7
|
+
*
|
|
8
|
+
* Cross-SDK Parity:
|
|
9
|
+
* Both Python and Node.js SDKs provide identical risk register APIs:
|
|
10
|
+
* - getRiskAssessment() / get_risk_assessment()
|
|
11
|
+
* - registerModelRisk() / register_model_risk()
|
|
12
|
+
* - getRiskForEvent() / get_risk_for_event()
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.assessmentToDict = assessmentToDict;
|
|
16
|
+
exports.getRiskAssessment = getRiskAssessment;
|
|
17
|
+
exports.registerModelRisk = registerModelRisk;
|
|
18
|
+
exports.unregisterModelRisk = unregisterModelRisk;
|
|
19
|
+
exports.clearRuntimeRegistry = clearRuntimeRegistry;
|
|
20
|
+
exports.getRiskForEvent = getRiskForEvent;
|
|
21
|
+
exports.validateModelRisk = validateModelRisk;
|
|
22
|
+
exports.getAllAssessments = getAllAssessments;
|
|
23
|
+
/**
|
|
24
|
+
* Convert assessment to dictionary for event inclusion.
|
|
25
|
+
*/
|
|
26
|
+
function assessmentToDict(assessment) {
|
|
27
|
+
const result = {
|
|
28
|
+
model: assessment.model,
|
|
29
|
+
risk_level: assessment.riskLevel,
|
|
30
|
+
risk_score: assessment.riskScore,
|
|
31
|
+
};
|
|
32
|
+
if (assessment.lastAssessed) {
|
|
33
|
+
result.last_assessed = assessment.lastAssessed;
|
|
34
|
+
}
|
|
35
|
+
if (assessment.assessor) {
|
|
36
|
+
result.assessor = assessment.assessor;
|
|
37
|
+
}
|
|
38
|
+
if (assessment.controls.length > 0) {
|
|
39
|
+
result.controls_applied = assessment.controls;
|
|
40
|
+
}
|
|
41
|
+
if (assessment.notes) {
|
|
42
|
+
result.notes = assessment.notes;
|
|
43
|
+
}
|
|
44
|
+
return result;
|
|
45
|
+
}
|
|
46
|
+
// Runtime model risk registry (for dynamic registration)
|
|
47
|
+
const runtimeRegistry = new Map();
|
|
48
|
+
/**
|
|
49
|
+
* Get risk assessment for a model.
|
|
50
|
+
*
|
|
51
|
+
* Checks runtime registry first, then config-based registry.
|
|
52
|
+
*
|
|
53
|
+
* @param model - The model identifier to look up.
|
|
54
|
+
* @param config - Optional config (uses runtime state if not provided).
|
|
55
|
+
* @returns ModelRiskAssessment if found, undefined if not in registry.
|
|
56
|
+
*/
|
|
57
|
+
function getRiskAssessment(model, config) {
|
|
58
|
+
// Check runtime registry first
|
|
59
|
+
if (runtimeRegistry.has(model)) {
|
|
60
|
+
return runtimeRegistry.get(model);
|
|
61
|
+
}
|
|
62
|
+
// Check config-based registry
|
|
63
|
+
if (!config) {
|
|
64
|
+
return undefined;
|
|
65
|
+
}
|
|
66
|
+
const riskConfig = config.risk_register;
|
|
67
|
+
if (!riskConfig?.enabled) {
|
|
68
|
+
return undefined;
|
|
69
|
+
}
|
|
70
|
+
const models = riskConfig.models || {};
|
|
71
|
+
const modelRisk = models[model];
|
|
72
|
+
if (!modelRisk) {
|
|
73
|
+
return undefined;
|
|
74
|
+
}
|
|
75
|
+
return {
|
|
76
|
+
model,
|
|
77
|
+
riskLevel: modelRisk.risk_level || 'high',
|
|
78
|
+
riskScore: modelRisk.risk_score ?? 75,
|
|
79
|
+
lastAssessed: modelRisk.last_assessed,
|
|
80
|
+
assessor: modelRisk.assessor,
|
|
81
|
+
controls: modelRisk.controls || [],
|
|
82
|
+
notes: modelRisk.notes,
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Register a model risk assessment at runtime.
|
|
87
|
+
*
|
|
88
|
+
* Use this for dynamic model registration when models aren't known
|
|
89
|
+
* at configuration time.
|
|
90
|
+
*
|
|
91
|
+
* @param model - The model identifier.
|
|
92
|
+
* @param options - Risk assessment options.
|
|
93
|
+
* @returns The created ModelRiskAssessment.
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* ```typescript
|
|
97
|
+
* registerModelRisk('custom-fine-tuned-model', {
|
|
98
|
+
* riskLevel: 'medium',
|
|
99
|
+
* riskScore: 45,
|
|
100
|
+
* controls: ['output_filtering']
|
|
101
|
+
* });
|
|
102
|
+
* ```
|
|
103
|
+
*/
|
|
104
|
+
function registerModelRisk(model, options = {}) {
|
|
105
|
+
const assessment = {
|
|
106
|
+
model,
|
|
107
|
+
riskLevel: options.riskLevel || 'high',
|
|
108
|
+
riskScore: options.riskScore ?? 75,
|
|
109
|
+
lastAssessed: new Date().toISOString().split('T')[0],
|
|
110
|
+
assessor: options.assessor,
|
|
111
|
+
controls: options.controls || [],
|
|
112
|
+
notes: options.notes,
|
|
113
|
+
};
|
|
114
|
+
runtimeRegistry.set(model, assessment);
|
|
115
|
+
return assessment;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Remove a model from the runtime registry.
|
|
119
|
+
*
|
|
120
|
+
* @param model - The model identifier to remove.
|
|
121
|
+
* @returns True if removed, false if not found.
|
|
122
|
+
*/
|
|
123
|
+
function unregisterModelRisk(model) {
|
|
124
|
+
return runtimeRegistry.delete(model);
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Clear all runtime risk registrations.
|
|
128
|
+
*/
|
|
129
|
+
function clearRuntimeRegistry() {
|
|
130
|
+
runtimeRegistry.clear();
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Get risk assessment dict for event inclusion.
|
|
134
|
+
*
|
|
135
|
+
* This is called internally when building events to include risk
|
|
136
|
+
* assessment information according to the configuration.
|
|
137
|
+
*
|
|
138
|
+
* @param model - The model being used.
|
|
139
|
+
* @param config - The Monora configuration.
|
|
140
|
+
* @returns Risk assessment dict for event body, or undefined if disabled.
|
|
141
|
+
*/
|
|
142
|
+
function getRiskForEvent(model, config) {
|
|
143
|
+
const riskConfig = config.risk_register;
|
|
144
|
+
if (!riskConfig?.enabled) {
|
|
145
|
+
return undefined;
|
|
146
|
+
}
|
|
147
|
+
const assessment = getRiskAssessment(model, config);
|
|
148
|
+
if (assessment) {
|
|
149
|
+
return assessmentToDict(assessment);
|
|
150
|
+
}
|
|
151
|
+
// Return default risk for unassessed models
|
|
152
|
+
const defaultLevel = riskConfig.default_risk_level || 'high';
|
|
153
|
+
return {
|
|
154
|
+
model,
|
|
155
|
+
risk_level: defaultLevel,
|
|
156
|
+
risk_score: levelToScore(defaultLevel),
|
|
157
|
+
assessed: false,
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Validate that model is allowed based on risk register.
|
|
162
|
+
*
|
|
163
|
+
* @param model - The model being used.
|
|
164
|
+
* @param config - The Monora configuration.
|
|
165
|
+
* @throws Error if block_unassessed is true and model not in register.
|
|
166
|
+
*/
|
|
167
|
+
function validateModelRisk(model, config) {
|
|
168
|
+
const riskConfig = config.risk_register;
|
|
169
|
+
if (!riskConfig?.enabled) {
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
if (!riskConfig.block_unassessed) {
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
const assessment = getRiskAssessment(model, config);
|
|
176
|
+
if (!assessment) {
|
|
177
|
+
throw new Error(`Model '${model}' is not in the risk register and block_unassessed is enabled. ` +
|
|
178
|
+
'Register the model using registerModelRisk() or add it to risk_register.models config.');
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Get all registered model risk assessments.
|
|
183
|
+
*
|
|
184
|
+
* @param config - Optional config for config-based assessments.
|
|
185
|
+
* @returns List of all ModelRiskAssessment objects.
|
|
186
|
+
*/
|
|
187
|
+
function getAllAssessments(config) {
|
|
188
|
+
const assessments = new Map();
|
|
189
|
+
// Add config-based assessments
|
|
190
|
+
if (config?.risk_register?.models) {
|
|
191
|
+
for (const [model, modelRisk] of Object.entries(config.risk_register.models)) {
|
|
192
|
+
assessments.set(model, {
|
|
193
|
+
model,
|
|
194
|
+
riskLevel: modelRisk.risk_level || 'high',
|
|
195
|
+
riskScore: modelRisk.risk_score ?? 75,
|
|
196
|
+
lastAssessed: modelRisk.last_assessed,
|
|
197
|
+
assessor: modelRisk.assessor,
|
|
198
|
+
controls: modelRisk.controls || [],
|
|
199
|
+
notes: modelRisk.notes,
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
// Override with runtime registrations
|
|
204
|
+
runtimeRegistry.forEach((assessment, model) => {
|
|
205
|
+
assessments.set(model, assessment);
|
|
206
|
+
});
|
|
207
|
+
return Array.from(assessments.values());
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Convert risk level to numeric score.
|
|
211
|
+
*/
|
|
212
|
+
function levelToScore(level) {
|
|
213
|
+
const scores = {
|
|
214
|
+
low: 25,
|
|
215
|
+
medium: 50,
|
|
216
|
+
high: 75,
|
|
217
|
+
critical: 95,
|
|
218
|
+
};
|
|
219
|
+
return scores[level] ?? 75;
|
|
220
|
+
}
|
package/dist/runtime.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ import { MonoraConfig, PresetName, SinkConfig } from './config';
|
|
|
11
11
|
import { TraceReportManager } from './reporting';
|
|
12
12
|
import { WriteAheadLog } from './wal';
|
|
13
13
|
import { EventSigner } from './signing';
|
|
14
|
+
import { QuotaManager } from './quotas';
|
|
14
15
|
interface MonoraState {
|
|
15
16
|
config: MonoraConfig;
|
|
16
17
|
eventBuilder: EventBuilder;
|
|
@@ -24,8 +25,19 @@ interface MonoraState {
|
|
|
24
25
|
wal: WriteAheadLog;
|
|
25
26
|
signer: EventSigner;
|
|
26
27
|
traceCompletionUnregister?: () => void;
|
|
28
|
+
traceStartUnregister?: () => void;
|
|
27
29
|
violationHandler?: (violation: Error) => void;
|
|
30
|
+
quotaManager: QuotaManager;
|
|
31
|
+
emitInternal?: (payload: Record<string, any> | string, body?: Record<string, any>, options?: {
|
|
32
|
+
dataClassification?: string;
|
|
33
|
+
purpose?: string;
|
|
34
|
+
reason?: string;
|
|
35
|
+
parentEventId?: string;
|
|
36
|
+
traceId?: string;
|
|
37
|
+
}) => Record<string, any> | null;
|
|
28
38
|
}
|
|
39
|
+
/** Callback function for init-time event notifications (alias for AuditCallback) */
|
|
40
|
+
export type InitEventCallback = (event: Record<string, unknown>) => void | Promise<void>;
|
|
29
41
|
/**
|
|
30
42
|
* Simplified init options for quick configuration.
|
|
31
43
|
*/
|
|
@@ -46,6 +58,22 @@ export interface InitOptions {
|
|
|
46
58
|
envPrefix?: string;
|
|
47
59
|
/** Raise exceptions on initialization errors */
|
|
48
60
|
failFast?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Callback invoked for every emitted event.
|
|
63
|
+
* Use for audit logging, SIEM integration, or compliance monitoring.
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* ```typescript
|
|
67
|
+
* init({
|
|
68
|
+
* onEvent: (event) => {
|
|
69
|
+
* myAuditSystem.log(event);
|
|
70
|
+
* }
|
|
71
|
+
* });
|
|
72
|
+
* ```
|
|
73
|
+
*/
|
|
74
|
+
onEvent?: InitEventCallback;
|
|
75
|
+
/** If true, prompt for optional project registration during init. */
|
|
76
|
+
promptAttribution?: boolean;
|
|
49
77
|
}
|
|
50
78
|
/**
|
|
51
79
|
* Initialize Monora with simplified configuration.
|
|
@@ -63,6 +91,12 @@ export interface InitOptions {
|
|
|
63
91
|
* init({ configPath: 'monora.yml' }); // Load from config file
|
|
64
92
|
* init({ configDict: {...} }); // Provide full config dict
|
|
65
93
|
* ```
|
|
94
|
+
*
|
|
95
|
+
* @remarks
|
|
96
|
+
* Cross-SDK Parity: This function is async (returns Promise) in Node.js but
|
|
97
|
+
* synchronous in Python. This is an intentional language difference:
|
|
98
|
+
* - Node.js: `await monora.init({ preset: 'production' })`
|
|
99
|
+
* - Python: `monora.init("production")`
|
|
66
100
|
*/
|
|
67
101
|
export declare function init(options?: InitOptions): Promise<void>;
|
|
68
102
|
/**
|
|
@@ -72,6 +106,12 @@ export declare function init(options?: InitOptions): Promise<void>;
|
|
|
72
106
|
* 1. Verifies all pending trace chains (if verify_on_shutdown enabled)
|
|
73
107
|
* 2. Finalizes all pending traces and emits report summaries
|
|
74
108
|
* 3. Closes all sinks and dispatchers
|
|
109
|
+
*
|
|
110
|
+
* @remarks
|
|
111
|
+
* Cross-SDK Parity: This function is async (returns Promise) in Node.js but
|
|
112
|
+
* synchronous in Python. This is an intentional language difference:
|
|
113
|
+
* - Node.js: `await monora.shutdown()`
|
|
114
|
+
* - Python: `monora.shutdown()`
|
|
75
115
|
*/
|
|
76
116
|
export declare function shutdown(): Promise<void>;
|
|
77
117
|
export declare function exportTrustPackage(traceId: string, options?: {
|
|
@@ -83,6 +123,21 @@ export declare function exportTrustPackage(traceId: string, options?: {
|
|
|
83
123
|
gpgKey?: string;
|
|
84
124
|
gpgHome?: string;
|
|
85
125
|
outputPath?: string;
|
|
126
|
+
evidenceManifest?: Record<string, any>;
|
|
127
|
+
evidenceManifestPath?: string;
|
|
128
|
+
evidenceManifestAuto?: boolean;
|
|
129
|
+
evidenceManifestStandard?: string;
|
|
130
|
+
evidenceManifestIncludeLineage?: boolean;
|
|
131
|
+
evidenceManifestIncludeHashChain?: boolean;
|
|
132
|
+
evidenceManifestIncludeWorkflowState?: boolean;
|
|
133
|
+
evidenceManifestIncludeAimsState?: boolean;
|
|
134
|
+
controlCatalog?: Record<string, any>;
|
|
135
|
+
controlCatalogPath?: string;
|
|
136
|
+
controlCatalogStandard?: string;
|
|
137
|
+
controlWorkflowState?: Record<string, any>;
|
|
138
|
+
controlWorkflowStatePath?: string;
|
|
139
|
+
controlCoverageTarget?: number;
|
|
140
|
+
controlCoveragePath?: string;
|
|
86
141
|
}): Record<string, any>;
|
|
87
142
|
export declare function setViolationHandler(handler: (violation: Error) => void): void;
|
|
88
143
|
export declare function logEvent(eventType: string, data: Record<string, any>, options?: {
|
|
@@ -110,17 +165,31 @@ export declare function agentStep(options: {
|
|
|
110
165
|
purpose: string;
|
|
111
166
|
}): <T extends (...args: any[]) => any>(fn: T) => T;
|
|
112
167
|
export declare function ensureState(): MonoraState;
|
|
168
|
+
/**
|
|
169
|
+
* Get the current Monora state, or null if not initialized.
|
|
170
|
+
* Use this for optional event emission where initialization isn't required.
|
|
171
|
+
*/
|
|
172
|
+
export declare function getState(): MonoraState | null;
|
|
113
173
|
/**
|
|
114
174
|
* Emit event with optional real-time verification.
|
|
115
175
|
*/
|
|
116
176
|
export declare function emitEvent(event: Record<string, any>, options?: {
|
|
117
177
|
recovered?: boolean;
|
|
118
178
|
}): void;
|
|
179
|
+
export declare function emitInternal(payload: Record<string, any> | string, body?: Record<string, any>, options?: {
|
|
180
|
+
dataClassification?: string;
|
|
181
|
+
purpose?: string;
|
|
182
|
+
reason?: string;
|
|
183
|
+
parentEventId?: string;
|
|
184
|
+
traceId?: string;
|
|
185
|
+
}): Record<string, any> | null;
|
|
186
|
+
export declare function notifyViolation(violation: Error): void;
|
|
119
187
|
export declare function executeCall(current: MonoraState, fn: (...args: any[]) => any, args: any[], config: {
|
|
120
188
|
options: any;
|
|
121
189
|
buildBody: (params: any) => Record<string, any>;
|
|
122
190
|
eventType: string;
|
|
123
191
|
}, context: any): any;
|
|
192
|
+
export declare function applyQuotaLimits(current: MonoraState, traceId: string | null, model: string | undefined, dataClassification: string, purpose: string, reason?: string, tokens?: [number, number], cost?: number, raiseOnBlock?: boolean): void;
|
|
124
193
|
export declare function buildLlmBody(params: {
|
|
125
194
|
model?: string;
|
|
126
195
|
provider?: string;
|
|
@@ -150,6 +219,11 @@ export declare function buildAgentBody(params: {
|
|
|
150
219
|
stepType?: string;
|
|
151
220
|
stepNumber?: number;
|
|
152
221
|
}): Record<string, any>;
|
|
222
|
+
export declare function extractUsageMetrics(response: any): {
|
|
223
|
+
tokens: [number, number] | null;
|
|
224
|
+
usage: any;
|
|
225
|
+
};
|
|
226
|
+
export declare function estimateUsageCost(current: MonoraState, model: string | undefined, usage: any, tokens: [number, number] | null): number | null;
|
|
153
227
|
export declare function isPromise(value: any): value is Promise<any>;
|
|
154
228
|
export {};
|
|
155
229
|
//# sourceMappingURL=runtime.d.ts.map
|
package/dist/runtime.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAAA;;GAEG;AAeH,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,aAAa,EAAiB,MAAM,YAAY,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAmB,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAA6C,MAAM,iBAAiB,CAAC;AAChG,OAAO,EAAE,eAAe,EAAyD,MAAM,cAAc,CAAC;AACtG,OAAO,EAGL,YAAY,EACZ,UAAU,EACV,UAAU,EACX,MAAM,UAAU,CAAC;AAKlB,OAAO,EAAE,kBAAkB,EAA4B,MAAM,aAAa,CAAC;AAI3E,OAAO,EAAE,aAAa,EAAuB,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,WAAW,EAA0B,MAAM,WAAW,CAAC;AA2BhE,OAAO,EAAE,YAAY,EAAwC,MAAM,UAAU,CAAC;AAE9E,UAAU,WAAW;IACnB,MAAM,EAAE,YAAY,CAAC;I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